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

Custom Update in RadGrid

2 Answers 43 Views
Grid
This is a migrated thread and some comments may be shown as answers.
archimede
Top achievements
Rank 1
archimede asked on 27 May 2010, 01:31 PM
I have a radGrid that shows data from an ObjetDataSource (a query with a join between multiple tables). I have defined on the grid the DataKeyValues (IdCultura, IdMaschera, Nome) and I want to catch a text field inserted by user:

protected void RadGridNomiMaschere_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
    { 
        switch (e.CommandName) 
        { 
            case "Update"
 
                long idCultura = (long)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["IdCultura"]; 
                long idMaschera = (long)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["IdMaschera"]; 
                string nome = (string)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Nome"]; 
                 
                break
        } 
    } 

In particular I want to retrieve the edited "Nome" field in grid. In this event I catch correctle the IdCultura and IdMaschera but always the old value and not the new one inserted by user. Why?


2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 May 2010, 02:00 PM

Hi,

I hope the documentation (which elaborates how to fetch the new values which the user entered), will give some insight on this.

Retrieving original values for edited item

 

-Shinu.

0
archimede
Top achievements
Rank 1
answered on 27 May 2010, 02:04 PM
My problem is not to retrieve an old value. I want to use in code the edited field value inserted in edit mode by the user.
Tags
Grid
Asked by
archimede
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
archimede
Top achievements
Rank 1
Share this question
or