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.
Hello Amro,
I am glad that the issue has been resolved.
Thank you for choosing Infragistics components!
Regards,Viktor KombovEntry Level Software DeveloperInfragistics, Inc.
Hi Viktor,
Thank you for your response. Sorry I was couldn't respond to you earlier as I was away. I've created a new solution with and implemented just the grid features I was after and it works fine. There are some other css/JS that were conflicting with that.
Thanks you very much for your support.
Hello Rajib,
Thank you for posting in our community.
I have created a small sample trying to reproduce the described behavior. I am using the same aproach as in the provided code snippet. On my side everything works as expected and no errors are occurred when I am ungrouping.
Attached you will find my sample for your reference. Please test it on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve, please feel free to modify it and send it back to me along with steps to reproduce. Alternatively, if the behavior cannot be replicated, please feel free to provide your own sample. Remove any external dependencies and code that is not directly related to the issue, zip your application and attach it in this forum thread.
Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior.
Thank you for your cooperation.
Looking forward to hearing from you.
Regards, Viktor KombovEntry Level Software DeveloperInfragistics, Inc.
igGridGrouping.zip