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.
Unfortunately, activation email could not send to your email. Please try again.

GDBG selection

Thread ID:





27715 Apr 15,2005 05:29 PM Apr 15,2005 07:45 PM Windows Forms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On April 15, 2005 05:29 PM

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

Administrator [Syncfusion]
Replied On April 15, 2005 07:45 PM

Rty using gridDataBoundGrid1.Selections.GetSelectedRows(true,false) so the currentcell is not always counted.


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.

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.