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

[Solved] Trouble converting from GridCommandEventArgs since latest update 1425

2 Answers 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Quin
Top achievements
Rank 1
Quin asked on 05 Mar 2008, 08:56 PM
Since the latest release I am not able to retrieve data from the radgrid using the following method:

 private int _getPhyIdfromArg(GridCommandEventArgs e) 
    { 
        int phyId = 0; 
        GridEditableItem eitem = e.Item as GridEditableItem; 
        Hashtable newValues = new Hashtable(); 
        eitem.OwnerTableView.ExtractValuesFromItem(newValues, eitem);        
        phyId = Convert.ToInt32(newValues["PhysicianId"]);         
 
        return phyId; 
    } 

This has affected all of my tables that use ExtractValuesFromItem.  Is there another update coming to fix this?

2 Answers, 1 is accepted

Sort by
0
Accepted
Sebastian
Telerik team
answered on 06 Mar 2008, 11:22 AM
Hi Quin,

Do you use InPlace editing for your grid? In case you use EditForms edit mode, note that you will need to invoke ExtractValuesFromItem() method for the respective GridEditFormItem instead, namely:

private int _getPhyIdfromArg(GridCommandEventArgs e)    
    {    
        int phyId = 0;    
        GridEditableItem eitem = (e.Item as GridDataItem).EditFormItem as GridEditableItem;    
        Hashtable newValues = new Hashtable();    
        eitem.OwnerTableView.ExtractValuesFromItem(newValues, eitem);           
        phyId = Convert.ToInt32(newValues["PhysicianId"]);            
    
        return phyId;    
    }    
 

Detailed explanation about the in-place and edit forms edit mode specifics can be found in the online help.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Quin
Top achievements
Rank 1
answered on 17 Mar 2008, 05:27 PM
Not using in place editing.  I have my created my own editing form.  Your code worked for me with slight modifications.  Thanks!
Tags
Grid
Asked by
Quin
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Quin
Top achievements
Rank 1
Share this question
or