Devexpress rowupdating cancel

Tried it out, but no luck getting it to work properly from the Row Updating/Inserting events Can you provide an simple pseudo code example where in the grid_Row Updating event an exception is handled in this waytry Catch (exception ex) When doing an update this is encountered before the customer error event thanks.

Hello Russell: When any exception is thrown within the ASPx Grid View, the ASPx Grid View's Custom Error Text event is raised. Exception property, which allow you to change the error text based on the type of this exception: Sorry, posted by accident too soon. ASPx Grid View Custom Error Text Event Args e) Just to make sure I am correct though, I should not handle the exception in the Row Inserting Event and let it propagate to the custom Error Text event?

I readded the event listener method for Row Update and added the following as per the example you mentioned:protected void ASPx Grid View_Row Updating(object sender, ASPx Data Updating Event Args e) Note, I had to comment out the "e.

Cancel = true" as I believe the issue I was having was that the underlying Linq Server Mode Data Source was also listening for the Row Update event (causing the need to manually Cancel Edit in the first place, but the Linq Server Mode Data Source On Updating would then not be called if Cancel was set to true as I suspect it added its event listener mine was added). If the Row Updated event is canceled in its handler, ASPx Grid View does not process this event and data is not sent to a datasource.

The Data Grid widget allows a user to add, delete and update data.

Assign true to the corresponding field of the editing object to enable an operation.

If you need to prevent row focus changes, set the Row Allow Event Args. If you only need to respond to row focus changes, handle the Focused Row Changed event.

To cancel the update operation, set the collections, if necessary, before the values are passed to the data source.

A common way to use these collections is to HTML-encode the values supplied by the user before they are stored in the data source.

Usually, this approach is used when a datasource does not support the Update method (for example, ASPx Grid View is bound to an in-memory collection) and data should be updated manually.

If you do not cancel this event (or do not handle it at all), ASPx Grid View should automatically close the Edit Form if no exception occurs during data update.

I cannot say why you face different behavior in your scenario until I investigate implementation details.

You must have an account to comment. Please register or login here!