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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Message Box caption

Thread ID:

Created:

Updated:

Platform:

Replies:

16871 Jul 26,2004 04:03 PM UTC Jul 26,2004 08:11 PM UTC WinForms 4
loading
Tags: GridControl
Sam
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.

Sam
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 = "".

Sam
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.

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.

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

;