I have a N-tier application patterned after the Northwind N-tier example.
Page Codebehind:
**** this is where my problem is ("Object reference not set to an instance of an object")
| protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e) |
| { |
| IDictionary dict = new Hashtable(); |
| GridEditFormItem editedItem = (GridEditFormItem)e.Item; |
| editedItem.OwnerTableView.ExtractValuesFromItem(dict, editedItem); |
| User editeduser = new User(); |
| **** editeduser.Uid = int.Parse(dict["Uid"].ToString()); |
| editeduser.First = dict["First"].ToString(); |
| editeduser.Last = dict["Last"].ToString(); |
| editeduser.Username = dict["Username"].ToString(); |
| dataProvider.UpdateUser(editeduser); |
| } |
Since the column "Uid" is both hidden and read only it doesn't show up in "dict".
How can I work around this? What is the correct way to access the value of a hidden read only value from UpdateCommand event?