Using Binding manager to retrieve a specified row

  • Thread starter Thread starter Nicholas Paldino [.NET/C# MVP]
  • Start date Start date
N

Nicholas Paldino [.NET/C# MVP]

VMI,

Instead of using the Current property, use the List property, and pass
in 5 (zero based), and you should get an object (in this case, the
DataRowView) for that row.

Hope this helps.
 
I'm currently using Binding manager to get the current datagrid row the user
clicked on:

DataRowView rowViewAudit = (DataRowView)
((CurrencyManager)BindingContext[_table_auditAddress]).Current;

But, instead of retrieving the current row, I want to retrieve row 6. How
can I modify the above code so that rowViewAudit holds the data from row 6
of the grid?

Thanks.
 
Once again, it worked.

Thanks.

Nicholas Paldino said:
VMI,

Instead of using the Current property, use the List property, and pass
in 5 (zero based), and you should get an object (in this case, the
DataRowView) for that row.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

VMI said:
I'm currently using Binding manager to get the current datagrid row the
user clicked on:

DataRowView rowViewAudit = (DataRowView)
((CurrencyManager)BindingContext[_table_auditAddress]).Current;

But, instead of retrieving the current row, I want to retrieve row 6.
How can I modify the above code so that rowViewAudit holds the data from
row 6 of the grid?

Thanks.
 
Back
Top