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

radgrid update row

1 Answer 162 Views
Grid
This is a migrated thread and some comments may be shown as answers.
niloofar
Top achievements
Rank 1
niloofar asked on 15 Sep 2010, 07:40 AM
hi
i use inline update
 switch (e.CommandName)
            {
                case RadGrid.UpdateCommandName:
                    {
                        GridEditableItem editedItem = (GridEditableItem)e.Item;
                        string id= editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["ActionID"].ToString();
                     
                        break;
                    }
......
}
how can i get new value?
thanks

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 Sep 2010, 09:07 AM
Hello Niloofar,

If you want to extract the new values from the edited table row, then better option is using 'ExtractValuesFromItem' method.

C#:
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
   {
        switch (e.CommandName)
           {
               case RadGrid.UpdateCommandName:
                   {
                       GridEditableItem editedItem = (GridEditableItem)e.Item;
                       Hashtable newValues = new Hashtable();
                       e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);
                       string id= newValues["ActionID"].ToString();
                       break;
                   }
          }
   }

Also please refer the following documentation
Updating values in-place and with edit forms

Thanks,
Princy.
Tags
Grid
Asked by
niloofar
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or