Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
encodeSortingParams issue in infragistics
posted

The infragistics.core.js  uses encodeSortingParams() function encode the $orderby clause of a remote url. When performing sorting and grouping

 

In the Sub Application List Hierarchical grid, we have

SubApplicationList (Main)

                Bit Llist (Child)

                RTA List (Child)

 

When adding a child field as group by. Order by expression for parent is having the child field name , causing bad request error.

 

/Users(198)/SubApplicationList?$orderby=GeographyApplicationDisplayString+asc,Size+asc,SubApplicationName+asc&layout=BitList&$skip=0&$top=10&$inlinecount=allpages&dbdepth=0&pk=ID&_=1480616911851

 

 

  • 29417
    Offline posted

    Hello Sathiyaprakash Kumar, 

    Thank you for posting in our forum. 

    Could you provide some additional information on the exact scenario and steps such as:

            1. Which version of the IgniteUI are you currently using ?

            2. Are both the Sorting and GroupBy feature set to be remote ?

            3. What are the exact steps that reproduce the issue (for example you sort a parent column and then group by on the child column or something similar)?

    I’m looking forward to your reply. 

     

    Best Regards,

    Maya Kirova

    Infragistics, Inc.

    http://www.infragistics.com/support

     

     

  • 40
    Offline posted in reply to Maya Kirova

    Infragistics.Web.ClientUI data source localization resources 15.1.20151.1005

     

    Yes Both Sorting and GroupBy feature set to be remote

     

    This issue is occurs when I add a group by in child table, and sort or move to another page(retrieve) of the parent grid.

     

    Below is my grid definition.

     

      $("#mySubApplications").igHierarchicalGrid({

            autoGenerateColumns: false,

            autoGenerateLayouts: false,

            renderCheckboxes: true,

            width: "100%",

            dataSource: ADESC_DATASOURCE_URL + "/Users(" + CURRENT_USER_ID + ")/SubApplicationList?$filter=Active eq true",

            responseDataKey: "value",

            initialDataBindDepth: 0,

            primaryKey: "ID",

            odata: true,

            rest: true,

            columns: [

               // { headerText: "Active", key: "Active", width: "5%", dataType: "bool" },

                { headerText: "ID", key: "ID", dataType: "number", width: "5%", template: "${ID}" },

                { headerText: "Geography / Application", key: "GeographyApplicationDisplayString", dataType: "string", width: "25%" },

                { headerText: "Sub-Application Name", key: "SubApplicationName", dataType: "string", width: "40%" },

                { headerText: "Assigned User(s)", key: "AssignedUsersDisplayName", dataType: "string", width: "10%" },

                { headerText: "Modified Date", key: "ModifiedDate", dataType: "date", format: "MM-dd-yyyy", width: "17%" },

                { headerText: "#Pending RTAs", key: "PendingRtaCount", dataType: "number", width: "10%" },

                //{ headerText: "#Active Bits", key: "ActiveBitsCount", dataType: "number", width: "10%" },

                { headerText: "AssignedUserIds_hidden", key: 'AssignedUserIds', dataType: 'string', width: '0%', hidden: "true" },

                { headerText: "OwnersUserIds_hidden", key: 'OwnersUserIds', dataType: 'string', width: '0%', hidden: "true" },

                { headerText: "Actions", key: "NOT_IMPLEMENTED", dataType: "string", width: "10%", unbound: true, formula: getSubApplicationActionTemplate }

            ],

            features: [

                {

                    name: "Paging",

                    type: "remote",

                    pageSize: 10,

                    recordCountKey: "odata.count",

                    pageIndexUrlKey: null,

                    pageSizeUrlKey: null

                },

                {

                    name: "Resizing"

                },

                {

                    name: "Sorting",

                    type: "remote",

                    columnSettings: [

                        { columnKey: "GeographyApplicationDisplayString", currentSortDirection: "ascending" },

                        { columnKey: "SubApplicationName", currentSortDirection: "ascending" },

                        { columnKey: "AssignedUsersDisplayName", allowSorting: false }

                    ]

                },

                {

                    name: "Responsive",

                    enableVerticalRendering: false,

                    columnSettings: [

                        {

                            columnKey: "ID",

                            classes: "ui-hidden-phone"

                        },

                        {

                            columnKey: "ModifiedBy",

                            classes: "ui-hidden-tablet ui-hidden-phone"

                        },

                        {

                            columnKey: "NumberPendingRTAs",

                            classes: "ui-hidden-phone"

                        },

                        {

                            columnKey: "NumberActiveBits",

                            classes: "ui-hidden-phone"

                        }

                    ]

                },

                {

                    name: "GroupBy",

                    columnSettings: [

                        {

                            columnKey: "GeographyApplicationDisplayString",

                            isGroupBy: true

                        }

                      ],

                    groupedColumnsChanged: function (evt, ui) {

                        showHideGroupedColumns(ui.owner);

                    }

                },

               {

                    name: "Tooltips",

                    columnSettings: [

                        { columnKey: "AssignedUsersDisplayName", allowTooltips: true }

                    ],

                    visibility: "always",

                    showDelay: 1000,

                    hideDelay: 500

                }

            ],

            rowsRendered: function (evt, ui) {

                showHideGroupedColumns(ui.owner.element.data("igGridGroupBy"));

            },

            columnLayouts: [

            {

                        childrenDataProperty: "RtaList",

                        key: "RtaList",

                        name: "RtaList",

                        autoGenerateColumns: false,

                        autoGenerateLayouts: false,

                        responseDataKey: "value",

                        dataSource: ADESC_DATASOURCE_URL + "/SubApplicationList",

                        primaryKey: "Id",

                        odata: true,

                        rest: true,

                        width: "100%",

                        columns: [

                        { headerText: "RTA #", key: "Id", dataType: "number", width: "20%", template: "${Id}" },

                         { headerText: "Type", key: "Type", dataType: "string", width: "10%" },

                            { headerText: "RTA Status", key: "Status", dataType: "string", width: "25%" },

                            { headerText: "RequiredDate", key: "RequiredDate", dataType: "date", format: "MM-dd-yyyy", width: "15%" },

                            { headerText: "SubmittedBy", key: "SubmittedBy", dataType: "string", format: "MM-dd-yyyy", width: "20%" },

                                    

                            {

                                headerText: "Actions",

                                key: "actions",

                                dataType: "string",

                                width: "10%",

                                unbound: true

     

                            }

                        ],

                        features: [

                           

                        {

                            name: "Paging",

                            type: "remote",

                            pageSize: 5,

                            recordCountKey: "odata.count",

                            pageIndexUrlKey: null,

                            pageSizeUrlKey: null

                        },

                        {

                            name: "Resizing"

                        },

                        {

                            name: "Responsive",

                            enableVerticalRendering: false,

                            columnSettings: [

                                {

                                    columnKey: "RequiredDate",

                                    classes: "ui-hidden-tablet ui-hidden-phone"

                                },

                                {

                                    columnKey: "Status",

                                    classes: "ui-hidden-phone"

                                },

                                {

                                    columnKey: "SubmittedBy",

                                    classes: "ui-hidden-tablet"

                                },

                                 

     

                            ]

                        },

                       {

                                name: "Sorting",

                                type: "remote"

                                

                            },

                            {

                                name: "Filtering",

                                type: "remote"

                            }

                        ]

                        },

                        {

                        childrenDataProperty: "BitList",

                        key: "BitList",

                        name: "BitList",

                        autoGenerateColumns: false,

                        autoGenerateLayouts: false,

                        responseDataKey: "value",

                        primaryKey: "MaterialNumber",

                        odata: true,

                        rest: true,

                        width: "100%",

                        columns: [

                            { headerText: "Mat. Num.", key: "MaterialNumber", dataType: "number", width: "8%", template: "${MaterialNumber}"},

                            { headerText: "Part Name", key: "PartFileName", dataType: "text", width: "8%" },

                            { headerText: "Sub PSL", key: "SubPSL", dataType: "text", width: "8%" },

                            { headerText: "Series", key: "Series", dataType: "text", width: "8%" },

                            { headerText: "RTA(s)", key: "RTANumber", dataType: "object", width: "15%" },

                            { headerText: "Size", key: "Size", dataType: "number",  width: "15%", template: "${Size}\"" },

                            { headerText: "Bit Type", key: "BitType", dataType: "string", width: "15%" },

                            { headerText: "Completed Date", key: "CompletedDate", dataType: "string", width: "15%" },

                            {

                                headerText: "Actions",

                                key: "Actions",

                                dataType: "string",

                                width: "10%",

                                unbound: true

                            }

                        ],

                        features: [

                            {

                                name: "GroupBy"

                            },

                        {

                            name: "Paging",

                            type: "local",

                            pageSize: 5,

                            recordCountKey: "odata.count",

                            pageIndexUrlKey: null,

                            pageSizeUrlKey: null

                        },

                        {

                            name: "Responsive",

                            enableVerticalRendering: false,

                            columnSettings: [

                                {

                                    columnKey: "RtaNumImportBit",

                                    classes: "ui-hidden-tablet  ui-hidden-phone"

                                },

                                {

                                    columnKey: "BitSize",

                                    classes: " ui-hidden-phone"

                                }

                            ]

                        },

                        {

                            name: "Filtering",

                           type: "Local"

                        }

                        ],

                }

            ]

        });

     

    Thank you for your help.

     

    -Sathiya