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.
Syncfusion Feedback

Retrieving the underlying row source when the row index is known.

Thread ID:

Created:

Updated:

Platform:

Replies:

7999 Oct 16,2003 12:33 PM UTC Oct 16,2003 12:58 PM UTC Windows Forms 2
loading
Tags: GridControl
Doug Lind
Asked On October 16, 2003 12:33 PM UTC

Hi again, I'm need to grab the DataRow used to populate a GDBG row. I have the list (range) info for the selected rows but am not sure of the syntax for mapping a grid row index to it's underlying datarow. Any suggestions? Thanks, Doug Lind

Administrator [Syncfusion]
Replied On October 16, 2003 12:54 PM UTC

To handle things like the grid being sorted or filtered, it best to go through the CurrencyManager. Here is some code. int pos = grid.Binder.RowIndexToPosition(rowIndex); CurrencyManager cm = (CurrencyManager) this.BindingContext[grid.DataSource, grid.DataMember]; DataRowView drv = (DataRowView) cm.List[pos]; DataRow dr = drv.Row;

Doug Lind
Replied On October 16, 2003 12:58 PM UTC

Mucho Garcia ;-) > To handle things like the grid being sorted or filtered, it best to go through the CurrencyManager. Here is some code. > > > int pos = grid.Binder.RowIndexToPosition(rowIndex); > CurrencyManager cm = (CurrencyManager) this.BindingContext[grid.DataSource, grid.DataMember]; > DataRowView drv = (DataRowView) cm.List[pos]; > DataRow dr = drv.Row; >

CONFIRMATION

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.

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

;