GrapeCity MultiRow Windows Forms Documentation
CellEditedFormattedValueChanged Event
Example 


Occurs when the cell's edited formatted value has changed.
Syntax
<SRCategoryAttribute("Action")>
<SRDescriptionAttribute("Occurs when the cell's edited formatted value has changed.")>
Public Event CellEditedFormattedValueChanged As EventHandler(Of CellEditedFormattedValueChangedEventArgs)
Dim instance As GcMultiRow
Dim handler As EventHandler(Of CellEditedFormattedValueChangedEventArgs)
 
AddHandler instance.CellEditedFormattedValueChanged, handler
[SRCategory("Action")]
[SRDescription("Occurs when the cell's edited formatted value has changed.")]
public event EventHandler<CellEditedFormattedValueChangedEventArgs> CellEditedFormattedValueChanged
Event Data

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

PropertyDescription
CellIndexGets the cell index in its parent Section. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs)
CellNameGets the cell name. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs)
ReasonRepresents the Cell's Cell.EditedFormattedValue reason for the change.  
RowIndexGets the index of the owner Row that the event occurs for. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs)
ScopeGets the area of the cell that the event occurs for. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs)
SectionIndexGets the index of the owner Section that the event occurs for. (Inherited from GrapeCity.Win.MultiRow.CellEventArgs)
Remarks
When a user edits a cell's value and then clicks another cell to apply the cell's value, the event order is:
  1. User double-clicks a cell or presses a shortcut key or presses a character to enter edit mode.
  2. User inputs a value in the editing control or editing cell.
  3. User clicks another cell and when the current cell starts to change, 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 RowLeave event is fired.
  5. Validates the cell 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 a new target cell.
Example
The following code example shows the CellEditedFormattedValueChanged event. When you click the RadioGroupCell, this event is raised, and the clicked item is shown in the Label. This code example is part of a larger example provided for the RadioGroupCell class.
private void gcMultiRow1_CellEditedFormattedValueChanged(object sender, CellEditedFormattedValueChangedEventArgs e)
        {
            int itemIndex = (int)(this.gcMultiRow1.GetEditedFormattedValue(e.RowIndex, e.CellIndex));
            this.label.Text = "The clicked item is " + (this.gcMultiRow1.CurrentCell as RadioGroupCell).Items[itemIndex];
        }
Private Sub gcMultiRow1_CellEditedFormattedValueChanged(ByVal sender As Object, ByVal e As CellEditedFormattedValueChangedEventArgs) Handles gcMultiRow1.CellEditedFormattedValueChanged
        Dim itemIndex As Integer = DirectCast((Me.gcMultiRow1.GetEditedFormattedValue(e.RowIndex, e.CellIndex)), Integer)
        Me.label.Text = "The clicked item is " + TryCast(Me.gcMultiRow1.CurrentCell, RadioGroupCell).Items(itemIndex)
    End Sub
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

GcMultiRow Class
GcMultiRow Members

 

 


Copyright © GrapeCity, inc. All rights reserved.