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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Automatic Validations in Grid Grouping Control

Thread ID:

Created:

Updated:

Platform:

Replies:

61944 Jun 5,2007 09:20 AM UTC Jun 5,2007 03:43 PM UTC WinForms 1
loading
Tags: GridControl
Aditi Pisal
Asked On June 5, 2007 09:20 AM UTC

Hi ,

I want to know how to handle unwanted validations that take place in gridgrouping control.
version 4.4.0.55
Example:
If I enter date like 00/00/2007
then grid show messagebox as Date entered is invalid.
I want to handel it by giving my own customized message.
Pls support your answer with sample code.
Thanks in Advance,
Aditi

haneefm [Syncfusion]
Replied On June 5, 2007 03:43 PM UTC

Hi Aditi,

You can handle the TableControlCurrentCellErrorMessage event to display your own custom message box whenever the grids CurrentCell.DisplayWarningText (as a result of some kind of validation error) is called. Here is a code snippet

private void GroupingGrid_TableControlCurrentCellErrorMessage(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellErrorMessageEventArgs e)
{
//To get the orginal error from e.Inner.Text
MessageBox.Show("AddNewUnique Error",MessageBoxButtons.OKCancel,MessageBoxIcon.Error );
e.Inner.Cancel = true;
}

Also refer to the below forum threads that shows you "How to customize the error-icon in a cell?".
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=46953
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=55049

Best regards,
Haneef

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

;