Hi there,
Currently I'm giving notifications like so:
It's probably simple but instead of getting the Id of the record I'm working with I'd like to get one of the column values. Lets say I have a column of Name. Then I'd like to get the name value and produce the message "'Name' was updated" instead of what I have now which gives me the Id.
Thanks :)
Currently I'm giving notifications like so:
| public static string ItemUpdated(object source, GridUpdatedEventArgs e, RadGrid RadGrid1) |
| { |
| GridEditableItem item = (GridEditableItem)e.Item; |
| string displayMsg = string.Empty; |
| string name = item.OwnerTableView.Name; |
| foreach(string dataKeyName in RadGrid1.MasterTableView.DataKeyNames) |
| { |
| string id = item.GetDataKeyValue(dataKeyName).ToString(); |
| if (e.Exception != null) |
| { |
| e.KeepInEditMode = true; |
| e.ExceptionHandled = true; |
| displayMsg = string.Format("{0} with ID " + id + " cannot be updated. Reason: " + e.Exception.Message, name); |
| } |
| else |
| { |
| displayMsg = string.Format("{0} with ID " + id + " is updated!", name); |
| } |
| } |
| return displayMsg; |
| } |
It's probably simple but instead of getting the Id of the record I'm working with I'd like to get one of the column values. Lets say I have a column of Name. Then I'd like to get the name value and produce the message "'Name' was updated" instead of what I have now which gives me the Id.
Thanks :)