1
votes

I have a DevExpress' ASPxGridView in my page with some data.

I want to get the values of a row based on an index.

Here's what I'm doing in the RowUpdating event:

Dim index As Integer = grdxFornecedor.FindVisibleIndexByKeyValue(e.Keys("IdFornecedor"))
Dim row As System.Data.DataRow = grdxFornecedor.GetDataRow(index)

The second line is returning Nothing, even with the index existing in the grid.

Anyone?

Thank you.

1
If you need to fetch values of row you are editing use e.NewValues. - Filip
Actually I already solved it using another option, thank you. - gabsferreira

1 Answers

1
votes

Use the ASPxGridView.GetRow method instead and convert the retrieved data item to the required destination type:

'Dim row As System.Data.DataRow = grdxFornecedor.GetDataRow(index)
Dim row As Object = grdxFornecedor.GetRow(index)