How to Retrieve Datarow From Griddataboundgrid with Rowindex in Windows Forms GridDataBoundGrid(Classic)
9 Dec 2019 / 1 minute to read
CurrencyManager cm=(CurrencyManager)BindingContext[gridDataBoundGrid1.DataSource, gridDataBoundGrid1.DataMember]; DataRow row; DataView dataView=(DataView)cm.List; //The 2 is the row index. int position = this.gridDataBoundGrid1.Binder.RowIndexToPosition(2); row=dataView[position].Row;
Dim cm As CurrencyManager= CType(BindingContext(gridDataBoundGrid1.DataSource, gridDataBoundGrid1.DataMember), CurrencyManager) Dim row As DataRow Dim dataView As DataView= CType(cm.List, DataView) 'The 2 is the row index. Dim position As Integer = Me.gridDataBoundGrid1.Binder.RowIndexToPosition(2) row=dataView(position).Row
Was this page helpful? Yes No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page