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

UpdateCommand get value

2 Answers 219 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Donatien
Top achievements
Rank 1
Donatien asked on 13 Jul 2011, 08:18 AM
Hello,

I am using the RadGrid and I initialize it dynamicaly with a DataTable.

I want to get the different values I updated in the UpdateCommand events, but I can't find it with the GridCommandEventArgs.

Could you help me?


thanks.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 13 Jul 2011, 08:36 AM
Hello Donatien,

Try the following code snippet in UpdateCommand to get the new value.

C#:
protected void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e)
{
      GridEditableItem editItem = e.Item as GridEditableItem;
      Hashtable newValues = new Hashtable();
      e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editItem);
      string id = newValues["ColumnUniqueName"].ToString();
}

Thanks,
Princy.
0
Donatien
Top achievements
Rank 1
answered on 13 Jul 2011, 08:47 AM
Yes it works!

Thanks for your help Princy ;)
Tags
Grid
Asked by
Donatien
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Donatien
Top achievements
Rank 1
Share this question
or