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

Cell validation message box

Thread ID:





53156 Dec 8,2006 09:45 PM UTC Jan 29,2007 08:09 PM UTC WinForms 3
Tags: GridControl
Jarrod Peace
Asked On December 8, 2006 09:45 PM UTC


I know that this has been covered in these forums, but I have not been able to get it working right. All I want to do is prevent the "Input was not in correct format" messagebox from appearing at all when an invalid input is entered in a GC. My problem is that this message is appearing when users are entering blanks, which is not desirable for our application. I would rather catch this message and clear out the contents of the cell on invalid input with no message. Any help on this would be greatly appreciated. Thanks in advance.


Administrator [Syncfusion]
Replied On December 9, 2006 12:34 AM UTC

One way you can try to do this is to handle the CurrentCellErrorMessage event. You can cancel this event to avoid the error message displaying. You can also reset the current text if you want to. Here is some code snippets.

private void Form1_Load(object sender, EventArgs e)
//make all cells doubles so errors are generated when you type something other than a double
this.gridControl1.TableStyle.CellValueType = typeof(double);

gridControl1.CurrentCellErrorMessage += new GridCurrentCellErrorMessageEventHandler(grid_CurrentCellErrorMessage);

void grid_CurrentCellErrorMessage(object sender, GridCurrentCellErrorMessageEventArgs e)
e.Cancel = true;
this.gridControl1.CurrentCell.Renderer.Control.Text = "";

James Blibo
Replied On January 29, 2007 07:18 PM UTC

How can I customize the tooltip message that is show? I want to add something like 'Press ESC' to cancel changes' for example to the message. Maybe even the column name!

Administrator [Syncfusion]
Replied On January 29, 2007 08:09 PM UTC

Hi James,

If you want to change the error tooltip text in a grid then you can hanlde the TableControlCurrentCellErrorMessage and set the custom error tooltip using CurrentRecordProperty.Exception property. Here is a code snippet to show this.

private void gridGroupingControl1_TableControlCurrentCellErrorMessage(object sender, GridTableControlCurrentCellErrorMessageEventArgs e)
GridGroupingControl grid = sender as GridGroupingControl;
foreach(CurrentRecordProperty prop in grid.Table.CurrentRecordManager.Properties)
if( prop.IsError)
prop.Exception = new Exception("Your ToolTip Message Here",prop.Exception.InnerException);

Best Regards,


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