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. Image for the cookie policy date

convert grid row index to underlying datarow

hi, I think this must have been written somewhere in your knowledge base but could you point me to the right direction?

1 Reply

AD Administrator Syncfusion Team April 21, 2004 08:32 PM UTC

There are KB''s on locating the DataRow at the current position, but not one on getting the DataRow at an abitrary index. Here is code that I think will locate the DataRow at a given grid row index, say rowIndex. CurrencyManager cm = (CurrencyManager) this.BindingContext[this.grid.DataSource, this.grid.DataMember]; int pos = this.grid.Binder.RowIndexToPosition(rowIndex); DataRowView drv = cm.List[pos] as DataRowView; DataRow dr = drv.Row;

Live Chat Icon For mobile
Up arrow icon