Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Retrieving a cell value from a selected row
posted

Hi! I'm trying to get a value of a cell out of a selected row when a button is pushed. I'm using

DataGrid1.Behaviors.Selection.SelectedRows.Item(0).GetValue(0).ToString

and it's saying I need to put in a gridrecord as a field, because an integer is a bad parameter. I understand how to do that if I was using a for each loop, and went through, for example

 

For

 

 

Each row As GridRecord In DataGrid1.Behaviors.Selection.SelectedRows

   MsgBox(row.Items.GetValue(0).ToString())

Next

But I don't know how to do that for a single, selected row. Where should I go from here?