We are currently facing a problem in deletion of rows. when the user select rows in sequence all the rows are deleted but if the user tags rows ( i.e select rows holding the ctrl key) only the last selected row gets deleted.
ADAdministrator Syncfusion Team April 8, 2005 09:29 AM
There is special handling required to remove non-contiguous records. As soon as one record is removed, then this may effect the poition of the other records that are selected. The GridDataBoundGrid does not try to handle this. It just deletes the records in the ActiveRange.
So if you want this behavior, then you would have to add support for this. You could do it in the RowsDeleting event.
private void grid_RowsDeleting(object sender, GridRowRangeEventArgs e)
GridRangeInfoList rangeList = this.grid.Selections.GetSelectedRows(true, false);
if(rangeList.Count > 0)
ArrayList a = new ArrayList();
CurrencyManager cm = (CurrencyManager)this.grid.BindingContext[this.grid.DataSource, this.grid.DataMember];
foreach(GridRangeInfo range in rangeList)
for(int row = range.Top; row <= range.Bottom; ++row)
int pos = this.grid.Binder.RowIndexToPosition(row);
foreach(int pos in a)
e.Cancel = true;