Link to home
Start Free TrialLog in
Avatar of ralphp1355
ralphp1355Flag for United States of America

asked on

VISUAL STUDIO VB - Trying to get a cell value from a selected row in a datagrid

I am trying to get one cell from the first selected row in a datagrid.

This does not work

strPreReconID = dgAssign.SelectedRows(0).Cells(2).Value.ToString
where strPreReconId is a declared string

I also tried square brackets. I get a
Index was out of range. Must be non-negative and less than the size of the collection.

My collection is 8 columns
ASKER CERTIFIED SOLUTION
Avatar of chaau
chaau
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ralphp1355

ASKER

Thank you