I am using Telerik Grid in my project.I set the "EnableHeaderContextMenu="true" to Hide/Show the Grid Columns. My requirement we are hiding some columns from Grid, I want to know which Columns are hided.
1 Answer, 1 is accepted
0
Andrey
Telerik team
answered on 27 May 2013, 12:26 PM
Hello,
In order to achieve your goal you could use the following code:
var grid = $find("RadGrid1");
var masterTableView = grid.get_masterTableView();
var columns = masterTableView.get_columns();
for (var i = 0; i < length; i++) {
if(columns[i].get_element().offsetWidth == 0)
{
//The column is hidden
}
}
Regards,
Andrey
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.