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

Retrive The new Edited Values

2 Answers 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mahmoud
Top achievements
Rank 1
Mahmoud asked on 25 Apr 2010, 03:24 PM
protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e) 
        { 
            GridEditableItem I = e.Item as GridEditableItem; 
            DataTable s = RadGrid1.DataSource as DataTable; 
            DataRow[] R = s.Select("ID = " + I.OwnerTableView.DataKeyValues[I.ItemIndex]["ID"].ToString()); 
            Hashtable newvalues = new Hashtable(); 
            I.OwnerTableView.ExtractValuesFromItem(newvalues, I); 
I'm Trying to update my Form By Code and I'm Using The UpdateCommand Event
Now when I'm Using DataKeyValue Method Its Return the old Values not the new values which is add by the user
So how can I get the New Value .
Note: I'm using Inplace Edit in my Grid.

2 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 29 Apr 2010, 07:13 AM
Hi Mahmoud,

If you are changing the value of the fields set as DataKeys during update, you should use the extracted values from the item instead using the  DataKeyValues collection.

For more information on how to extract item's values please refer to this online help article.

All the best,
Rosen
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Mahmoud
Top achievements
Rank 1
answered on 04 May 2010, 06:36 PM
Thanks Rosen
It's Work,
Thank You Again
Tags
Grid
Asked by
Mahmoud
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Mahmoud
Top achievements
Rank 1
Share this question
or