- 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.
ADAdministrator Syncfusion Team April 7, 2005 06:50 AM
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;
ArrayList a = new ArrayList();
foreach(SelectedRecord rec in e.TableControl.Table.SelectedRecords)
foreach(SelectedRecord rec in a)
e.Inner.Handled = true;
2) One way you can do this is to listen to teh TableDescriptor.GroupdeColumnsChanging.