Apr 06, 2009, 3:01 PM
Question about hidding a column in a grid
Hi,
i was trying to hide some columns of a grid, when i found this example
https://examples1.ext.net/#/GridPane...Configuration/
When i saw the code example i notice that you hide/show the columns by index,
Because users can swtich the orders of the columns, if you place 'Change %' before 'Change', tou will be hidding/showing the wrong column.
Is there a way of indexing the column besides the index, like the id or dataindex?
Thanks,
Nuno Santos
i was trying to hide some columns of a grid, when i found this example
https://examples1.ext.net/#/GridPane...Configuration/
When i saw the code example i notice that you hide/show the columns by index,
protected void ToggleChange(object sender, AjaxEventArgs e)
{
ToolbarButton button = sender as ToolbarButton;
this.GridPanel1.ColumnModel.SetHidden(2, button.Pressed);
button.Text = button.Pressed ? "Show Change" : "Hide Change";
}
Because users can swtich the orders of the columns, if you place 'Change %' before 'Change', tou will be hidding/showing the wrong column.
Is there a way of indexing the column besides the index, like the id or dataindex?
Thanks,
Nuno Santos