System.Windows.Forms.DataGridViewDataErrorEventArgs.Context Property

Gets details about the state of the System.Windows.Forms.DataGridView when the error occurred.

Syntax

public DataGridViewDataErrorContexts Context { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Members of the System.Windows.Forms.DataGridViewDataErrorContexts enumeration may be combined using the bitwise OR operator to represent the state of a data-bound System.Windows.Forms.DataGridView when a data error occurred. For example, if a user enters an invalid cell value (such as entering a name in a cell that requires a date) and then selects a different cell, the System.Windows.Forms.DataGridView will try to commit the invalid cell value. When the commit fails, the System.Windows.Forms.DataGridView will raise a DataGridView.DataError event whose DataGridViewDataErrorEventArgs.Context property will have a value of DataGridViewDataErrorContexts.Commit and DataGridViewDataErrorContexts.CurrentCellChange.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0