We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

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 12:01 PM

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.
Live Chat Icon For mobile
Up arrow icon