This is a migrated thread and some comments may be shown as answers.

RadGrid cannot get the savedoldvalues

3 Answers 171 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Wilson
Top achievements
Rank 1
Wilson asked on 17 Aug 2008, 04:24 AM
Hi,

The "SavedOldValues"  returns empty hashtable.
Please help.  

Private Sub GridViewControl_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles GridViewControl.ItemCommand

If (e.CommandName = RadGrid.UpdateCommandName) Then

If (e.Item.GetType.ToString = "Telerik.Web.UI.GridEditFormItem") Then

Dim editedItem As GridEditFormItem = CType(e.Item, GridEditFormItem)

_Session(

"RadGrid.SavedOldValues") = editedItem.SavedOldValues

End If

End If

End Sub

Wilson

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 20 Aug 2008, 07:00 AM
Hello Wilson,

The approach in question is applicable for autogenerated column editors, as described in this article. If using a template column, the approach is slightly different.
Let me know if this information helps.

Regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Wilson
Top achievements
Rank 1
answered on 20 Aug 2008, 12:29 PM
Hi,

The AutoGenerateColumns was set to "true"

It works fine with _Grid.MasterTableView.EditMode=GridEditMode.InPlace

But, it doesn't work with GridEditMode.EditForms

Any trick?

Thanks,
Wilson
0
Kiara
Top achievements
Rank 1
answered on 22 Aug 2008, 01:38 PM
Have you set AllowAutomaticUpdates = true for the master table in the grid? I noticed that in your code snippet from the help topic and it is probably an important part of the implementation. Also make sure that you bind the grid with NeedDataSource event handling.

Kiara
Tags
Grid
Asked by
Wilson
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Wilson
Top achievements
Rank 1
Kiara
Top achievements
Rank 1
Share this question
or