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
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?
HI,
I am using it this way in the RowSelectionChanged event and works for me, I hope this help you.
TCtrITEM_ID.Text = e.CurrentSelectedRows(0).DataItem(1).ToString
Thanks.
Hi all,
As garciama suggests, when handling the RowSelectionChanged event, the selected row(s) can be accessed through the event argument.
Please contact me if you have any questions.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://ko.infragistics.com/support