If you look in the attached image, I am inserting a row into a radgrid with the Editmode="Popup". The insert is failing because there is already a row with the user/password combination.
I am using the following code to display the error.
protected void RadGrid1_ItemInserted(object source, GridInsertedEventArgs e) |
{ |
if (e.Exception != null) |
{ |
Exception eex = e.Exception; |
string msg; |
if (ex.InnerException != null) msg = ex.InnerException.Message; |
else msg = ex.Message; |
RadGrid1.Controls.Add(new LiteralControl(string.Format("<span style='color:red'>{0}</span>", msg))); |
e.ExceptionHandled = true; |
} |
} |
I would like to change the code above to display the error in the popup edit window instead of at the bottom of the grid itself. Anyone know how to do this?
I've tried to put a label in the edit window but whenever I assign a value to the label in the RadGrid1_ItemInserted function, the new value is never rendered on the popup window.
Thanks.