We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

GridDataBoundGrid with a dataset

Thread ID:

Created:

Updated:

Platform:

Replies:

14281 May 24,2004 09:22 AM May 28,2004 12:44 PM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On May 24, 2004 09:22 AM

What''s the best pratice for catching validation errors that are thrown when you add a new row to the grid that violates a dataset constraint (e.g. field doesn''t allow nulls)? The grid, it seems, handles the exception and presents a friendlier message rather than a raw exception, but I''d like to customize the error message. Thanks!

Administrator [Syncfusion]
Replied On May 24, 2004 11:05 AM

Try handling teh ValiateFailed event, and in your handler set grid.CurrentCell.ErrorMessage. Private Sub GridDataBoundGrid1_ValidateFailed(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridValidateFailedEventArgs) Handles GridDataBoundGrid1.ValidateFailed MessageBox.Show("My Message") e.Handled = True End Sub

Administrator [Syncfusion]
Replied On May 28, 2004 12:44 PM

Thanks for the tip!

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;