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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Various questions, grouping grid

Thread ID:





27169 Apr 7,2005 10:05 AM UTC Apr 7,2005 11:50 AM UTC WinForms 1
Tags: GridControl
Kjetil Kåresen
Asked On April 7, 2005 10:05 AM UTC

- How can I let the user delete rows? The default toolbar of the grid doesn''t seem to have a delete button? - Is there an easy way to have the grid hide the columns that are used for the grouping? (These are the same in each group anyway.) - How can I implement expand all/collapse all groups. Your help is much appriciated.

Administrator [Syncfusion]
Replied On April 7, 2005 11:50 AM UTC

1) You can handle the TableControlCurrentCellKeyDown and call GridRecord.Delete for each selected record. (Assumes you are using the TableOptions.AllowSelections = None and TableOptions.ListBoxSelectionMode set to somthing other than None.).
private void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e)
	if(e.Inner.KeyCode == Keys.Delete)
		int rowIndex = e.TableControl.CurrentCell.RowIndex;
		int colIndex = e.TableControl.CurrentCell.ColIndex;
		Console.WriteLine("del key");
		ArrayList a = new ArrayList();
		foreach(SelectedRecord rec in e.TableControl.Table.SelectedRecords)
		foreach(SelectedRecord rec in a)
		e.Inner.Handled = true;
		e.TableControl.CurrentCell.MoveTo(rowIndex, colIndex);

2) One way you can do this is to listen to teh TableDescriptor.GroupdeColumnsChanging.
private void GroupedColumns_Changing(object sender, Syncfusion.Collections.ListPropertyChangedEventArgs e)
	if(e.Action == Syncfusion.Collections.ListPropertyChangedType.Insert)
		SortColumnDescriptor desc = e.Item as SortColumnDescriptor;
3) this.gridGroupingControl1.Table.CollapseAllRecords(); this.gridGroupingControl1.Table.CollapseAllGroups();


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon