gabsferreira
gabsferreira

Reputation: 3137

GetDataRow method of ASPxGridView returning nothing

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.

Upvotes: 1

Views: 1228

Answers (1)

Mikhail
Mikhail

Reputation: 9300

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)

Upvotes: 1

Related Questions