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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataBoundGrid with a dataset

Thread ID:





14281 May 24,2004 01:22 PM UTC May 28,2004 04:44 PM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On May 24, 2004 01:22 PM UTC

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 03:05 PM UTC

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 04:44 PM UTC

Thanks for the tip!


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon