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
20
iggrid ungroupByColumn error while trying to ungroup
posted

Hi,

I'm working on a MVC project with iggrid. My model has a list of items and I'm binding the table with items. All works well, accept when I'm trying to ungroup a column after grouping it.

 $(function () {
        $("#tblInvoices").igGrid({
            autoGenerateColumns: false,
            fixedHeader: false,
            columns: [
                { headerText: "Invoice #", key: "InvoiceID", dataType: "number", width: 100 },
                { headerText: "Invoice Category", key: "InvoiceCategory", dataType: "string" },
                { headerText: "Invoice Status", key: "InvoiceStatus", dataType: "string" },
                { headerText: "Contractor", key: "ContractorName", dataType: "string" },
                { headerText: "Project", key: "ProjectName", dataType: "string" },
                { headerText: "Invoice Date", key: "InvoiceDate", dataType: "Date" },
                { headerText: "Due Date", key: "DueDate", dataType: "Date" },
                { headerText: "Total", key: "InvoiceTotal", dataType: "decimal" },
                { headerText: "Payment Status", key: "PaymentStatus", dataType: "string" },
                { headerText: "Actions", key: "Actions", dataType: "string", width: 80 },
            ],
            primaryKey: "InvoiceID",
            height: '800px',
            features: [
                {
                    name: "Selection",
                    mode: "row",
                    multipleSelection: true,
                    activation: true
                },
                {
                    name: "Paging",
                    pageSize: 20
                },
                {
                    name: "GroupBy",
                    type: "local"
                    /*persist: true*/
                },
                {
                    name: "Sorting",
                    type: "local",
                    caseSensitive: true,
                    columnSettings: [
                        { columnKey: "ContractorName", allowSorting: true },
                        { columnKey: "DueDate", allowSorting: true, isGroupBy: true, dir: "asc" }
                    ]
                },
                {
                    name: 'Resizing',
                    columnSettings: [
                        { columnKey: "ContractorName", allowResizing: true }
                    ]
                }

            ]
        });
    });

Here's error that is being thrown:

How do I resolve this?

Thanks in advance for your help.