I have a telerik radgrid that is doing an insert using an objectdatasource. The insert method the objectdatasource calls has a boolean return value that I want to check in the radgrid’s ItemInserted event.
Is this possible and what is the code to do it. I checked the GridInsertedEventArgs e and there is no way I can see to get the return value but it must be there, I think I am just missing it.
Any help would be appreciated.
The
ItemInsertedevent is better used with exceptions, hence it includes anExceptionandExceptionHandledproperty.If your object data source insertion method fails (which, I trust, is what the boolean return value is intended to indicate), you should throw an
Exceptionof a specific type which you can then inspect within theItemInsertedevent.Then depending on the type of exception, you can choose to modify the
ExceptionHandledproperty and theKeepInInsertModeof theTelerik.Web.UI.GridInsertedEventArgsparameter.