Syncfusion.Grid.Windows
Example 


CurrentCellErrorMessage Event (GridControlBase)

The CurrentCellErrorMessage notifies you that the current cell validation failed and a message is displayed. You can cancel the event and display your own custom messagebox.
Syntax
'Declaration
 
<CategoryAttribute("Behavior")>
<DescriptionAttribute("Occurs when the current cell validation fails.")>
Public Event CurrentCellErrorMessage As GridCurrentCellErrorMessageEventHandler
'Usage
 
Dim instance As GridControlBase
Dim handler As GridCurrentCellErrorMessageEventHandler
 
AddHandler instance.CurrentCellErrorMessage, handler
[Category("Behavior")]
[Description("Occurs when the current cell validation fails.")]
public event GridCurrentCellErrorMessageEventHandler CurrentCellErrorMessage
Event Data

The event handler receives an argument of type GridCurrentCellErrorMessageEventArgs containing data related to this event. The following GridCurrentCellErrorMessageEventArgs properties provide information specific to this event.

PropertyDescription
(Inherited from System.ComponentModel.CancelEventArgs)
Gets or sets TextBoxCellRenderer the owner that should be passed as argument to the MessageBox.Show call.  
Gets or sets TextBoxCellRenderer the suggested error text to be displayed.  
Example
public Form1()
{
    InitializeComponent();
            
    this.gridDataBoundGrid2.CurrentCellErrorMessage += new GridCurrentCellErrorMessageEventHandler(gridDataBoundGrid2_CurrentCellErrorMessage);
    this.sqlDataAdapter1.Fill(this.dataSet11);
}
            
void gridDataBoundGrid2_CurrentCellErrorMessage(object sender, GridCurrentCellErrorMessageEventArgs e)
{
    MessageBox.Show(e.Owner, e.Text);
    e.Cancel = true;
}
AssemblyVersion

Syncfusion.Grid.Windows: 17.3460.0.14

See Also