Hi,
I have an issue with hiding columns in Band(1).
In Band(0), hiding a column can be done by:WebHierarchicalDataGrid1.GridView.Columns(0).Hidden = True
So I tried for Band(1):WebHierarchicalDataGrid1.GridView.Band.Bands(1).Columns(0).Hidden = True
But that doesn't work.
Thanks,Andreas
My InitialDataBindDepth is set to 0 so I'm not binding the children when the parent is loaded. When I try and access the columns in the RowIslandDataBound event, my columns collection is empty. I'm autogenerating columns and want to hide two of them. Any suggestions?
Ok, it works. Thanks!
If your question is how to hide and unhide a grouped column then you can use the GroupedColumnsChanging event similar to the following code snippet:
protected void WebHierarchicalDataGrid1_GroupedColumnsChanging(object sender, GroupedColumnsChangingEventArgs e)
{
if (e.Action == GroupByChangeAction.Group)
foreach (GroupedColumn col in e.EffectedColumns)
e.Band.Columns[col.ColumnKey].Hidden = true;
if (e.Action == GroupByChangeAction.Ungroup)
e.Band.Columns[col.ColumnKey].Hidden = false;
}
Magued
Sorry, it indeed exists in this event and it hides columns.:-)
I only have to find out how I can limit the effect on the lowest band level, depending on how group by is used by the user.
have you checked it in Visual Studio?
My Visual Studio 2008 insists that e.RowIsland is no member of "System.EventArgs" (I'm using VB.NET).
Regards,Andreas