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

Message Box caption

Thread ID:





16871 Jul 26,2004 04:03 PM UTC Jul 26,2004 08:11 PM UTC WinForms 4
Tags: GridControl
Asked On July 26, 2004 04:03 PM UTC

I have the gridboundgrid inside a dialog mode form. One of the column inside the grid is of type double and only allow number between 0 and 100. CellValueType = System.Double ValidateValue.NumberRequired = True ValidateValue.Minimum = 0 ValidateValue.Maximum = 100 ValidateValue.ErrorMessage = Must between 0 and 100 Everything is working nicely, except that the message shown in the message box does not have a caption/title. Is there any property that I can set for the message box title? Thanks, Sam

Administrator [Syncfusion]
Replied On July 26, 2004 04:49 PM UTC

No. But you can handle the grid.ValidateFailed event, and there display your own MessageBox or Form or whatever. In the handler, you would want to set e.Handled = true to tell the grid you showed a dialog.

Replied On July 26, 2004 06:52 PM UTC

Clay, Thanks very much for the prompt reply. I have tried to implement your solution. It works great if I move out from the grid after entering non-numeric data in the cell. But, if I move to another cell inside the grid afterwards, it show me the message twice, one from my own messagebox from the event handler and one from the grid itself. The code that I use is as follow: private void grid_ValidateFailed(object sender, Syncfusion.Windows.Forms.Grid.GridValidateFailedEventArgs e) { GridCurrentCell currentCell = grid.CurrentCell; MessageBox.Show(currentCell.ErrorMessage, this.Text); e.Handled = true; } Thanks in advance, Sam

Administrator [Syncfusion]
Replied On July 26, 2004 07:32 PM UTC

The the Validatefailed handler, try also setting grid.CurrentCell.ErrorMessage = "".

Replied On July 26, 2004 08:11 PM UTC

Great, it works. You just have to know the way. Silly me never thought of that.


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