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:
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?
| 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?