Hi,
I am trying to add row level filter textbox while generating dynamic columns and models.
But, I am not able to make the row level filter while generating the dynamic columns and models.
If I add filterable: {mode: "row"} this is code in my project, the grid is not loading and showing some error.
I used below code for this issue.
Please help me to resolve this issue.
var model = self.generateModel(gridData);
var filter = self.filterdateFN(gridData);
var grid = $(ele).kendoGrid({
toolbar: ["excel"],
excel: {
allPages: true,
fileName: kendo.toString(kendo.date.today(), 'yyyy-MM-dd') + ".xlsx",
},
dataSource: {
data: gridData.Data,
model: model,
pageSize: 50
},
resizable: true,
batch: true,
pageable: true,
pageable: {
pageSizes: [10,20, 50, 100],
numeric: false
},
sortable: {
compare: customCompare
},
groupable: true,
scrollable: true,
filterable: {mode: "row"},
detailInit: grid_detailInit,
columns: ColumnGeneration(gridData.Data[0]),
excelExport: _VM_Layout.excelExport,
dataBound: function (e) {
if (self.loadonPannelClick() == 1) {
$('.k-grid-content').height(350);
}
else {
$('.k-grid-content').height(150);
}
var grid = this;
var dataSource = $(ele).data("kendoGrid").dataSource;
if (!dataSource.data()[0].HierarchyData) {
grid.wrapper.find('table colgroup col.k-hierarchy-col').width('0px');
grid.table.find('colgroup col.k-hierarchy-col').width('0px');
grid.tbody.find("td.k-hierarchy-cell a").removeClass("k-icon k-i-expand");
}
$(".lnkPanelDocument").click(function (e) {
e.stopImmediatePropagation();
var grid1 = $(ele).data("kendoGrid");
var row = $(this).closest("tr");
var dataItem = grid1.dataItem(row);
self.ViewFile(dataItem);
});
}
}).data('kendoGrid');
Hi Mohan,
Thank you for sharing the Grid declaration.
I looked into it and I can say it looks good. What is the error message you are receiving? Furthermore, I created a demo that utilizes a dynamic Grid with a detail template and row filter mode enabled. It all seems to be working fine.
Feel free to modify the above to showcase the problem or assemble an entirely new demo so I can have a better understanding of the case.
Hi Nikolay,
Thanks for your response.
I will check this code in my project and let you know.
Hi Mohan,
Let me know if you manage to resolve the situation.