Hide a column when I drag it to group

Hi: How can I hide a column when I drag it to the grouping par, and make it visible when it returns to the grid? And maybe a beginner question, but in a GDBG when my grid is empty the currentcell.rowindex value is 1, same than when I have only one row. This way I have to check before execute an action how much records I have in the binder. Is there a better way to do that? Thanks in advance.

1 Reply

AD Administrator Syncfusion Team November 18, 2004 05:01 PM UTC

To hide the grouped column, you can use subcribe to the TableDescriptor.GroupedColumns.Changing
private void GroupedColumns_Changing(object sender, Syncfusion.Collections.ListPropertyChangedEventArgs e)
{
	SortColumnDescriptor scd = e.Item as SortColumnDescriptor;
	if(e.Action == Syncfusion.Collections.ListPropertyChangedType.Remove)
			this.gridGroupingControl1.TableDescriptor.VisibleColumns.Add(scd.Name);
	else if(e.Action == Syncfusion.Collections.ListPropertyChangedType.Add)
	this.gridGroupingControl1.TableDescriptor.VisibleColumns.Remove(scd.Name);
}
Try these two properties to get total count and filtered counts. this.gridGroupingControl1.Table.Records.Count; this.gridGroupingControl1.Table.FilteredRecords.Count;

Loader.
Up arrow icon