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
15
Uncaught TypeError: Cannot read property '_expandendnoevents' of undefined
posted

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