Hi,,
I am using following code to find the selected rows, Then I am deleting those rows from grid (basically deleting from table)
this.gdbgSelectedCompany.BeginUpdate();
DataRow selectedRow;
DataTable selectedSource = ((DataView)this.gdbgSelectedCompany.DataSource).Table;
System.Collections.ArrayList al = new ArrayList();
//GridRangeInfoList rangeList = this.gdbgSelectedCompany.Selections.GetSelectedRows(false, true);
GridRangeInfoList rangeList = this.gdbgSelectedCompany.Selections.GetSelectedRows(true, true);
foreach(GridRangeInfo range in rangeList)
{
for (int row=range.Top; row <= range.Bottom;row++)
{
selectedRow = selectedSource.Rows[row -1];
al.Add(selectedRow);
}
}
for (int i=0; i
0
private int GDBGSelectedRowsCount()
{
int rowCount=0;
GridRangeInfoList rangeList =
// this.gdbgSelectedCompany.Selections.GetSelectedRows(false, true);
this.gdbgSelectedCompany.Selections.GetSelectedRows(true, true);
foreach(GridRangeInfo range in rangeList)
{
rowCount = rowCount +( range.Bottom - range.Top + 1);
}
return rowCount;
}
test_6326.zip