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

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;

Live Chat Icon For mobile
Up arrow icon