Dear support team!
I using component igHierarchicalGrid have problem
+ Auto collapse records has been expand when I scrolling down.
+ Not expand with records >25 and display error "Uncaught TypeError: Cannot read property '_expandendnoevents' of undefined"
More detail see gif image : "https://s2.gifyu.com/images/Error_expan_table.gif"
Code call generate table :
$("#igGridLog").igHierarchicalGrid({ width: "100%", height: "calc(100% - 15px)", dataSource: listLogBasicInfor, features: [ { name: "Tooltips", inherit: true }, { name: "Responsive", enableVerticalRendering: false }, { name: "Resizing", deferredResizing: false, allowDoubleClickToResize: true, inherit: true }, { name: "Sorting", inherit: false }, { name: "Paging", pageSize: 100, type: "local", inherit: true }, { name: "Filtering", type: "local", filterDropDownItemIcons: false, filterDropDownWidth: 200, filterDialogHeight : "390px", filterDialogWidth : "515px", columnSettings: [ { columnKey: "parentKey", allowFiltering: false }, { columnKey: "operationId", allowFiltering: false } ] } ], autoGenerateColumns: false, primaryKey: "parentKey", hidePrimaryKey: true, columns: self.columnsIgGrid(), autoGenerateLayouts: false, rowVirtualization: true, virtualization: true, virtualizationMode: 'continuous', columnLayouts: [ { width: "100%", childrenDataProperty: "lstLogDataCorrectRecordRefeDto", hidePrimaryKey: true, autoGenerateColumns: false, primaryKey: "childrentKey", foreignKey: "operationId", columns: [ { key: "childrentKey", headerText: "", dataType: "string", hidden: true }, { key: "targetDate", headerText: "targetDate", dataType: "string", width: "170px" }, { key: "itemName", headerText: "itemName", dataType: "string", width: "170px", formatter: _.escape }, { key: "valueBefore", headerText: "valueBefore", dataType: "string", width: "170px", formatter: _.escape }, { key: "valueAfter", headerText: "valueAfter", dataType: "string", width: "170px", formatter: _.escape }, { key: "correctionAttr", headerText: "correctionAttr", dataType: "string", width: "170px" } ], features: [ { name: 'Selection', multipleSelection: false }, { name: "Responsive", enableVerticalRendering: false, columnSettings: [] } ] } ], });
+ Event when expand
$(document).delegate("#igGridLog", "igchildgridcreated", function(evt, ui) { var headerSetting = $(ui.element).data("headersetting"); var header = ui.element.find("th[role='columnheader']"); for (var i = 0; i < headerSetting.length; i++) { var currentSetting = headerSetting[i]; header.filter("th[aria-label='" + currentSetting.key + "']") .find(".ui-iggrid-headertext").text(currentSetting.headerText) } });
$(document).delegate("#igGridLog", "igchildgridcreating", function(evt, ui) { evt; var childSource = ui.options.dataSource; var ds = $("#igGridLog").igGrid("option", "dataSource"); var parentSource = _.isArray(ds) ? ds : ds._data; var headerSetting = []; var newSource = []; if (childSource.length > 0) { for (var i = 0; i < parentSource.length; i++) { if (parentSource[i].parentKey === childSource[0].parentKey) { headerSetting = parentSource[i].subColumnsHeaders; newSource = _.cloneDeep(parentSource[i].lstLogPerCateCorrectRecordDto); } } ui.options.dataSource = newSource; $(ui.element).data("headersetting", headerSetting); } });
Please help me to fixed it
Thank you
Hello,Thank you for contacting Infragistics.After looking into the grid configuration you are using I noticed that you have set the virtualizationoption of the hierarchical grid to true.When using virtualization in igHierarchicalGrid the expanded rows cannot be preserved between virtualization frames. There is a known issue in our docs about this.We suggest that you set virtualization to false (or remove the options related to the virtualization).We also suspect that the JavaScript error is related to the virtualization, so when you turn it off you should not see the error anymore.
In case you have additional questions feel free to ask them.
Hello, Martin Kamenov !Thank , for your confirm.
I investigate follow sugget of you. Problem is property "rowVirtualization" when I setting is "false" the problem was solvedBut have new problem with scroll of table+ When rowVirtualization = "true" => scroll display is true but have problem above.
+When rowVirtualization = "false" scroll display is false
Hello! Martin KamenovThank for your answer.
But when I set virtualization to false or remove this option . It create new problem with scroll bar
!!