Hi,
I currently have a Master Grid and a Detail Grid. I am trying to show/hide columns based on user selection which is stored in the database.
For example:
Master Grid : Col1,Col2,Col3
Detail Grid: ColA,ColB,ColC,ColD,ColF
Now, i retrieve col names from the database. On DataBound event of the detail grid i have a function call which
loops thru the data and calls hideColumn() and it works for the first detail grid of the first master row.
but when expanding the second row of the master the detail grid does not hide any columns.
Please help.
var grid = $("#childgrid").data("kendoGrid");
if (grid != undefined) {
for (var i = 0; i < view.length; i++) {
var columnName = view[i]["FieldName"];
var selected = view[i]["Selected"]
if (selected == true) {
grid.showColumn(columnName);
} else {
grid.hideColumn(columnName);
}
}
}
I currently have a Master Grid and a Detail Grid. I am trying to show/hide columns based on user selection which is stored in the database.
For example:
Master Grid : Col1,Col2,Col3
Detail Grid: ColA,ColB,ColC,ColD,ColF
Now, i retrieve col names from the database. On DataBound event of the detail grid i have a function call which
loops thru the data and calls hideColumn() and it works for the first detail grid of the first master row.
but when expanding the second row of the master the detail grid does not hide any columns.
Please help.
var grid = $("#childgrid").data("kendoGrid");
if (grid != undefined) {
for (var i = 0; i < view.length; i++) {
var columnName = view[i]["FieldName"];
var selected = view[i]["Selected"]
if (selected == true) {
grid.showColumn(columnName);
} else {
grid.hideColumn(columnName);
}
}
}