How can one hide a column -- client-side -- in a WebHierarchicalDataGrid? I know how it can be done in a WebDataGrid, but I'm at a loss as to how it can be done in a WebHierarchicalDataGrid.
Which event do you use to access the javascript? I've tried putting your example in both
ClientEvents-DataBound
="HideColumns" and
ClientEvents-Initialize
="HideColumns" , but nothing happens.
Thanks!
Idx refers to the column index, by the way..
That didn't work, but the following code did:
var grid = $find("WebHierarchicalDataGrid1");
var childGrid = grid.get_gridView().get_rows().get_row(0).get_rowIslands(0)[0]; childGrid.get_columns().get_column(idx).set_hidden(true);
Hi,
If you hide a column in the WebHierarchicalDataGrid, you will be doing the hiding in only one row island at a time. You would have to get the change to the band in order for it to take affect across all row islands. Here is code to do it at the top.
grid.get_gridView().get_columns().get_column(0).set_hidden(true);
Let us know if you have difficulty.
regards,David Young