Our requirement is for a RadGrid to provide inserts and edits to the rows. At any given time if the user does not like what they have added, they can hit a "reload" button and the original dataset is reloaded to the grid. This piece works fine.
Upon completion of inserted rows and edits to existing rows, the user will click a Submit button on a form and all of the new and edited data will be committed to the database.
I am struggling with reading the radgrid to update to the database.
How do I loop through the rows...I have tried a couple methods to capture each row and so I may execute a SP to insert the row.
However I cannot seem to be able to read the rows, while they are int's strings etc. my latest attempt was to just capture the text from each GridDataItem, based on a forum post I found.
For Each row As GridDataItem In rgMyGrid.Items
Dim ID As String = row.Item("ID").Text
Dim Rate As String = row.Item("Rate").Text
Dim Description As String = row.Item("Description").Text
What are my options? It does not appear I can pull the radgrid into a datatable. And my attempts along those lines failed.
So I am attempting to go row by row, which will work provided i can
1. identify each row
2. extract the data value from each column
3. convert to appropriate datatype
Thank you for suggestions
ps - i forgot to mention this is intended for VB codebehind. thanks.