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
35
Remote Paging and Remote GroupBy
posted

Hi,

I am using Infragistics with TypeScript and I read that remote paging and remote GroupBy working together is a known limitation. But do you have any plan to fix it? Our customers need GroupBy as a required feature.

I am firing custom events when page changes and groupby changes (with a custom call to the server) so I can even specify it as local. I am getting the data by setting those to local and it is still not working properly.

This is my gridoptions:

protected DefaultGridOptions: IgGrid = {
        autoCommit: true,
        autofitLastColumn: true,
        autoGenerateColumns: true,
        renderCheckboxes: true,
        autoAdjustHeight: true,
        showFooter: true,
        avgRowHeight: "25px",
        defaultColumnWidth: "*",
        fixedHeaders: false,
        responseDataKey: "result",
        features: [
            {
                name: "Resizing",
                deferredResizing: false,
                allowDoubleClickToResize: true
            },
            {
                name: "ColumnMoving",
                addMovingDropdown: false,
            },
            {
                name: "Selection",
                persist: true,
                multipleSelection: true
            },
            {
                name: "Sorting",
                type: "local",
                mode: "multi",
                columnSorting: async (evt, ui) => { await this.SortGrid(evt, ui); }
            },
            {
                name: "Filtering",
                type: "local",
                persist: false,
                showEmptyConditions: true,
                filterDropDownItemIcons: true,
                dataFiltering: async (evt, ui) => { await this.FilterGrid(evt, ui); }
            },
            {
                name: "Paging",
                type: "local",
                pageSize: 40,
                pageCountLimit: 5000,
                showPageSizeDropDown: false,
                recordCountKey: "totalRecords",
                pageSizeUrlKey: "pageSize",
                pageIndexUrlKey: "pageNumber",
                pageIndexChanging: async (evt, ui) => { await this.PageChange(evt, ui); }
            },
            {
                name: "GroupBy",
                type: "local",
                groupByDialogContainment: "window",
                groupedColumnsChanged: async (evt, ui) => {
                    await this.GroupByGrid(evt, ui);
                },
                initialExpand: false
            }
        ]
    };

Once I receive the data I am doing this:

$.igGrid("dataSourceObject", {
    result: (data),
    totalRecords: (total records)
});
$.igGrid("dataBind");

Once all this happens, the total number of pages only shows "1" and does not show the actual number of pages as per the total record count.

How do I fix this?

Thanks.