Hi,
I am using igHierarchical grid using Load on Demand and row level editing.
I am using Simple Filtering feature which works fine the first time the grid is loaded. However if I make a change to the row and click on done I am not able to use this feature and it throws the following error:
Unhandled exception at line 23, column 15086 in localhost:31607/.../infragistics.ui.editors.js
0x800a138f - JavaScript runtime error: Unable to get property 'push' of undefined or null reference
On clicking on done , when saveChanges is called I need to call
grid.igHierarchicalGrid("dataBind"); and expand the grid using
var parentGrid = $("#igGrid").igHierarchicalGrid("rootWidget");
var domElement = parentGrid.rowById(rowID);
if (domElement != null) {
$("#igGrid").igHierarchicalGrid("expand", domElement, function () {
});
After this is called the grid is refreshed with the latest values from the DB and the grid is expanded, but when I click on the filter icon on any of the columns and click on any option e.g Starts with it throws the above Js error.
I do not need to refresh the grid from the DB but want to have filter functionality work as it is.
Can you please help me with this?
Regards
Singh
Hello Sukhpreet,
Thank you for posting in our forum.
I was not able to reproduce the issue you have so a little more information would be very helpful:
What is the version of the Ignite UI scripts you are referring to in your View and are you using combined files (Infragistics.core.js and Infragistics.lob.js) or igLoader?
To get the script version, in the browser’s DevTools console write the following: “$.ui.igHierarchicalGrid.version”.
Posting your grid initialization code and the full error stack trace here would be greatly appreciated.
I would need them in order to make a code sample, which would help me reproduce the issue, debug it, and be able to give you a more specific answer.
If you need any additional assistance, feel free to contact me.
Best Regards,
Vasil Pavlov
Associate Software Developer
Infragistics, Inc.
Hi Vasil,
Thanks for your reply.
We are using igLoader and the version is 16.2.20162.2114
I am creating the grid in the controller using load on demand:
private GridColumnLayoutModel GetGridModel() { GridColumnLayoutModel childModel = new GridColumnLayoutModel(); childModel.Key = "Details"; childModel.PrimaryKey = "CurrentId"; childModel.ForeignKey = "Id"; childModel.AutoGenerateColumns = false; childModel.AutoCommit = false; childModel.LoadOnDemand = true;
childModel.Columns.Add(new GridColumn { Key = "CurrentId", Hidden = true, DataType = "string" }); childModel.Columns.Add(new GridColumn { Key = "Id", Hidden = true, DataType = "number" }); childModel.Columns.Add(new GridColumn { Key = "DetailID", HeaderText = "Detail ID", Width = "240", DataType = "string", ColumnCssClass = "grid-column" }); childModel.Columns.Add(new GridColumn { Key = "Time", HeaderText = " Time", Width = "140", DataType = "string" , ColumnCssClass = "grid-column" }); childModel.Features.Add(new GridSorting { Mode = SortingMode.Single, Type = OpType.Local }); childModel.Features.Add(new GridFiltering { CaseSensitive = false, Type = OpType.Remote});
childModel.Features.Add(new GridPaging { PageSize = 5, Type = OpType.Local }); //childModel.Features.Add(new GridResizing());
var updating = new GridUpdating();
updating.EnableAddRow = false; updating.EnableDeleteRow = false;
updating.ColumnSettings.Add(new ColumnUpdatingSetting { ColumnKey = "DetailID", ReadOnly = true, }); updating.ColumnSettings.Add(new ColumnUpdatingSetting { ColumnKey = "Time", ReadOnly = true });
childModel.Features.Add((updating)); childModel.DataSourceUrl = Url.Action("BindDetails", new { });
GridColumnLayoutModel Model = GetGridModel(); childModel.ColumnLayouts.Add(Model); return childModel; }
.grid-column {
font-size: small;
}
I am trying to filter on Time column which is just a string. for e.g 09:01
Call stack is as below:
Please let me know if you need any other information.
Hello Singh,
The “CaseSensitive” option works with local filtering only so you could remove it from your code.
The stack-trace doesn’t give much of a clue about what is happening, so in order to reconstruct your scenario I will need all the JavaScript code from your View files – not only the snippet you showed above.
Could you post it here: this includes the functions, the event handlers and the grid methods you are calling?