Get the current row in DataTable
Check the below code snippet.
CurrencyManager cm = (CurrencyManager) this.BindingContext[this.gridDataBoundGrid.DataSource, this.gridDataBoundGrid.DataMember];
DataRow dr = ((DataRowView) cm.Current).Row;
this.label1.Text = dr["Col"].ToString();
Reference : How do I locate the current row in my DataTable after the GridDataBoundGrid has been sorted or filtered?
Written by 小叮噹文青
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#.net
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#