I am trying to get hidden columns field names from Kendo Grid in JavaScript. Is there any way to get all hidden column filed names?
Each column
of the grid has a hidden
attribute. You can access the columns and build an array of field
items if the hidden
attribute is true:
var grid = $("#grid").data("kendoGrid");
var columns = grid.columns;
var hiddenFields = [];
for(var i = 0; i < columns.length; ++i) {
if(columns[i].hidden) {
hiddenFields.push(columns[i].field);
}
}
Dojo example to demonstrate.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.