I have a RadGrid set up to do automatic inserts and updates. I get the edit links, which open the edit form, as it should. I can enter and retrieve the new values with no problems. However, because we are connecting to a legacy mainframe application, we have to send ALL the on screen data in one message; I can't just do a simple update of the single record I'm editing.
In order for the pop-up editing to work in the grid I'm using the OnNeedDataSource event. I believe this is causing the problem.
I have code behind the Update command for this grid (rgdDetails) to update the selected row's "ItemClass" cell. I know it's hitting this code, because the "Record Updated" message is being displayed, but the text in the cell is not being changed. Am I not handling the OnNeedDataSource event properly? Is it reloading and overwriting the data that I want to change with the original data? Or am I doing something incorrectly when trying to enumerate the cell I want to change?
Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
editedItem = e.Item
editedItem("ItemClass").Text = "Testdata"
rgdDetails.MasterTableView.ClearEditItems()
Master.MessagePanel.InfoMessage("Record Updated")
Here is a section of the OnNeedDataSource code. It's opening a query and setting the datasource for the grid.
In order for the pop-up editing to work in the grid I'm using the OnNeedDataSource event. I believe this is causing the problem.
I have code behind the Update command for this grid (rgdDetails) to update the selected row's "ItemClass" cell. I know it's hitting this code, because the "Record Updated" message is being displayed, but the text in the cell is not being changed. Am I not handling the OnNeedDataSource event properly? Is it reloading and overwriting the data that I want to change with the original data? Or am I doing something incorrectly when trying to enumerate the cell I want to change?
Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
editedItem = e.Item
editedItem("ItemClass").Text = "Testdata"
rgdDetails.MasterTableView.ClearEditItems()
Master.MessagePanel.InfoMessage("Record Updated")
Here is a section of the OnNeedDataSource code. It's opening a query and setting the datasource for the grid.
Dim pDate As String = _Control.SelectedDate.ToString
Dim pStore As String = _Control.SelectedStore
Dim pTerm As String = _Control.SelectedTerminal
Dim pTran As String = _Control.SelectedTransaction
If (pStore <> "0") And (pTerm IsNot Nothing) And (pTran IsNot Nothing) And (pTran <> "") Then
Dim ds1 As DataSet = TransDetailDAL.GetTranItemsDetail(pDate, pStore, pTerm, pTran)
rgdDetails.DataSource = ds1
Dim dr As DataRow = TransDetailDAL.GetTranHDRDetail(pDate, pStore, pTerm, pTran)