Hi,
I have a radgrid based on a view (two tables) using entity datasource.
When MasterTableView has EditMode="Batch" I am trying to use RadGrid1_UpdateCommand to
update values
Protected Sub RadGrid1_UpdateCommand(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand
Dim editableItem = (DirectCast(e.Item,GridEditableItem))
Dim partId = DirectCast(editableItem.GetDataKeyValue("PartID"), String)
Dim coeus As New RTClientEntities()
Dim part = coeus.Parts.Where(Function(p) p.PartID = partId).FirstOrDefault()
If part IsNot Nothing Then
editableItem.UpdateValues(part)
part.LastChangedBy = getUser()
coeus.SaveChanges()
End If
End Sub
When this function executes, editableItem has old values and updates part with them.
I can see new values in
TryCast(e.CommandArgument, GridBatchEditingEventArgument).NewValues()
When I change EditMode="InPlace" , everything works just fine.
Is there something I can do to new values in batch edit mode?
I have a radgrid based on a view (two tables) using entity datasource.
When MasterTableView has EditMode="Batch" I am trying to use RadGrid1_UpdateCommand to
update values
Protected Sub RadGrid1_UpdateCommand(sender As Object, e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand
Dim editableItem = (DirectCast(e.Item,GridEditableItem))
Dim partId = DirectCast(editableItem.GetDataKeyValue("PartID"), String)
Dim coeus As New RTClientEntities()
Dim part = coeus.Parts.Where(Function(p) p.PartID = partId).FirstOrDefault()
If part IsNot Nothing Then
editableItem.UpdateValues(part)
part.LastChangedBy = getUser()
coeus.SaveChanges()
End If
End Sub
When this function executes, editableItem has old values and updates part with them.
I can see new values in
TryCast(e.CommandArgument, GridBatchEditingEventArgument).NewValues()
When I change EditMode="InPlace" , everything works just fine.
Is there something I can do to new values in batch edit mode?