GDBG. How can I get RowIndex for specified DataRow?

I Have a DataRow object. How can I get corresponding RowIndex in the Grid for that specified datarow? Regards, Slava.

1 Reply

AD Administrator Syncfusion Team May 17, 2004 11:04 AM UTC

Normally, you would use the CurrencyManager. CurrencyManager cm = (CurrencyManager)this.BindingContext[this.grid.DataSource, this.grid.DataMember]; DataView dv = cm.List as DataView; if(dv != null) { int position = this.grid.Binder.RowIndexToPosition(someRowIndex); DataRowView drv = cm.List[postion]; DataRow dr = drv.Row; }

Loader.
Up arrow icon