Hi Guys,
I was hoping someone might be able to point me in the right direction with a grid edit issue. I need to use a grid where all rows are always in edit mode, and then be able to retrieve the values within each rows columns.
I tried setting all rows to edit within the pre render event but this would only ever set the last row to edit mode. I managed to get all rows into edit mode as follows:
When I then need to retrieve the values in each row I am having trouble accessing the edit items.
I've tried the following code, however the editItem always returns nothing. Any ideas in what I'm doing wrong in trying to obtain the values?
Thanks
I was hoping someone might be able to point me in the right direction with a grid edit issue. I need to use a grid where all rows are always in edit mode, and then be able to retrieve the values within each rows columns.
I tried setting all rows to edit within the pre render event but this would only ever set the last row to edit mode. I managed to get all rows into edit mode as follows:
Dim i As Integer
For i = 0 To rgDbValues.PageSize - 1
rgDbValues.EditIndexes.Add(i)
Next i
When I then need to retrieve the values in each row I am having trouble accessing the edit items.
I've tried the following code, however the editItem always returns nothing. Any ideas in what I'm doing wrong in trying to obtain the values?
For Each item As GridDataItem In rgDbValues.EditItems
Dim editItem As GridEditFormItem = DirectCast(item.EditFormItem, GridEditFormItem)
If editItem.IsInEditMode Then
Dim str1 As String = TryCast(editItem("dbValue").Controls(0), TextBox).Text
End If
Next
Thanks