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

GDBG selection

Thread ID:





27715 Apr 15,2005 09:29 PM UTC Apr 15,2005 11:45 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On April 15, 2005 09:29 PM UTC

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 11:45 PM UTC

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.

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