how can I get the single row in a datagrid when click on it

I use datagrid.CurrentRowIndex, but this value can not be mapped to the datasource. How to get the rowindex of the datasource when clicked the datagrid? thanks.

1 Reply

AD Administrator Syncfusion Team November 29, 2002 08:45 AM UTC

You can try using the Position property of the CurrencyManager object. CurrencyManager cm = (CurrencyManager) this.BindingContext[this.dataGrid1.DataSource, this.DataGrid1.DataMember]; int index = cm.Position;

Loader.
Up arrow icon