Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
How to hide a column when it is grouped?
posted

I have a WebHierarchicalDataGrid with the Outlook group-by feature enabled. When a column is grouped, I would like the column to disappear from the grid, since it is pointless to repeat the data in each row. Is there a way to do this and have it reappear when the column is "un-grouped"?

 

Thanks for your help

Parents
No Data
Reply
  • 49378
    posted

    Hi awxs,

    Thank you for posting in the community.

    In this scenario, handling the GroupedColumnsChanged event of the grid can be used to manipulate the displayed columns of the grouped band. For instance:

        protected void WebHierarchicalDataGrid1_GroupedColumnsChanged(object sender, Infragistics.Web.UI.GridControls.GroupedColumnsChangedEventArgs e)
        {
        e.Band.Columns.FromKey(e.GroupedColumns[0].ColumnKey).Hidden = true;
        }

    Please let me know if this helps.

Children