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
965
UltraGridGroup and Column Chooser
posted

Hello,

I am using Infragistics 15.1 and have a grid in which I create UltraGridGroups and have a column chooser on the grid. I can hide/unhide columns, however when I hide the last column in a group I'd like the group header column to also hide. For example Group2 would be hidden when Column3 and Column4 are hidden and the group header would reappear if Column3 or Column4 was made visible again. What would be the preferred method to accomplish this functionality?

Sample code to create UltraGridGroups

UltraGridBand band = ugGrid.DisplayLayout.Bands[0];
band.RowLayoutStyle = RowLayoutStyle.GroupLayout;
UltraGridGroup ultraGridGroup1 = band.Groups.Add( "Group1", "Group 1" );
UltraGridGroup ultraGridGroup2 = band.Groups.Add( "Group2""Group 2" );
band.Columns["Column1"].RowLayoutColumnInfo.ParentGroup = ultraGridGroup1
band.Columns["Column2"].RowLayoutColumnInfo.ParentGroup = ultraGridGroup1;
band.Columns["Column3"].RowLayoutColumnInfo.ParentGroup = ultraGridGroup2;
band.Columns["Column4"].RowLayoutColumnInfo.ParentGroup = ultraGridGroup2;