GrapeCity.Win.MultiRow Namespace : CellValidatingEventArgs Class |
Public Class CellValidatingEventArgs Inherits CellCancelEventArgs
Dim instance As CellValidatingEventArgs
public class CellValidatingEventArgs : CellCancelEventArgs
The GcMultiRow.CellValidating event allows you to cancel the current cell changes when the new value is not valid. Use the FormattedValue property to determine the current value. To determine the state of the current cell, use the CellCancelEventArgs.RowIndex and CellCancelEventArgs.CellIndex or CellCancelEventArgs.CellName properties to access the cell through the GcMultiRow.Rows collection. Set the System.ComponentModel.CancelEventArgs.Cancel property to true to cancel the change.
When this event is canceled in data bound mode, the new value is not pushed to the underlying data source. When this event is canceled in virtual mode, the GcMultiRow.CellValuePushed event is not raised.
The GcMultiRow.CellValidating event can only be fired when it loses input focus (before leaving the current cell) or the GcMultiRow validates. In the default keyboard setting, pressing the "Enter" key only leaves the edit state but does not leave the current cell. So the GcMultiRow.CellValidating event cannot fire when pressing the "Enter" key. If you want to fire the GcMultiRow.CellValidating event, assign the "Enter" key to the SelectionActions.MoveToNextCell or SelectionActions.MoveDown action.
The event order for when a user edits a cell's value and then clicks to another cell to apply the cell's value is as follows:
System.Object
System.EventArgs
System.ComponentModel.CancelEventArgs
GrapeCity.Win.MultiRow.CellCancelEventArgs
GrapeCity.Win.MultiRow.CellValidatingEventArgs
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2