AD
Administrator
Syncfusion Team
February 26, 2007 03:41 PM UTC
Hi Joel,
You can handle the GroupedColumns.Changing event of the grid and use the VisibleColumns property of the grid to manage the display columns of the grid. Here is a code snippet.
this.gridGroupingControl1.TableDescriptor.GroupedColumns.Changing +=new Syncfusion.Collections.ListPropertyChangedEventHandler(GroupedColumns_Changing);
private void GroupedColumns_Changing(object sender, Syncfusion.Collections.ListPropertyChangedEventArgs e)
{
switch( e.Action)
{
case Syncfusion.Collections.ListPropertyChangedType.Insert:
SortColumnDescriptor icolumn = e.Item as SortColumnDescriptor;
this.gridGroupingControl1.TableDescriptor.VisibleColumns.Remove(icolumn.Name);
break;
case Syncfusion.Collections.ListPropertyChangedType.Remove:
SortColumnDescriptor rcolumn = e.Item as SortColumnDescriptor;
this.gridGroupingControl1.TableDescriptor.VisibleColumns.Add(rcolumn.Name);
break;
}
}
Best regards,
Haneef