GrapeCity MultiRow Windows Forms Documentation
CellValidatingEventArgs Class
Members 


Provides data for the GcMultiRow.CellValidating event of the GcMultiRow control.
Syntax
Public Class CellValidatingEventArgs 
   Inherits CellCancelEventArgs
Dim instance As CellValidatingEventArgs
public class CellValidatingEventArgs : CellCancelEventArgs 
Remarks

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:

  1. User double-clicks a cell or presses a shortcut key or presses a character to enter edit mode.
  2. The user inputs a value in the editing control or editing cell.
  3. The user clicks another cell and the current cell starts to move. The user can redirect the new cell position.
  4. If the new target cell's row index is different from the old current cell's row index, the GcMultiRow.RowLeave event fires.
  5. Validates the cell's value.
  6. Converts the editing value type to a cell acceptable value type.
  7. The editing value is applied to the cell.
  8. Validates the entire row's value when the new target cell's row index is different from the old current cell's row index.
  9. The editing control or editing cell is uninstalled.
  10. Enters new target cell.

Inheritance Hierarchy

System.Object
   System.EventArgs
      System.ComponentModel.CancelEventArgs
         GrapeCity.Win.MultiRow.CellCancelEventArgs
            GrapeCity.Win.MultiRow.CellValidatingEventArgs

Requirements

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

See Also

Reference

CellValidatingEventArgs Members
GrapeCity.Win.MultiRow Namespace
CellValidating Event
RowValidating Event

 

 


Copyright © GrapeCity, inc. All rights reserved.