
| Type | Description | |||
| Boolean | A boolean expression that indicates whether the editing operation starts once that a cell is focused. |
Use the AutoEdit property to choose how the user edits the data. By default, the AutoEdit property is True. Use the Edit method to start editing the focused cell. Use the EditType property to define the column's editor. Use the ReadOnly property to make the control read only. Use the FocusItem property to retrieve the focused item. Use the FocusColumnIndex property to get the index of the column that's focused. Use the Editing property to check whether the control is in edit mode, or to get the window's handle for the built-in editor that's visible and focused.
The edit events are fired in the following order:
The following VB sample starts editing a cell when user presses the F4 key:
Private Sub G2antt1_KeyDown(KeyCode As Integer, Shift As Integer)
' Starts editing data when the user presses the F4 key
With G2antt1
If (Not .AutoEdit) Then
If (KeyCode = vbKeyF4) Then .Edit
End If
End With
End Sub
The following C++ sample starts editing the focused cell when user presses the F4 key:
void OnKeyDownG2antt1(short FAR* KeyCode, short Shift)
{
if ( *KeyCode == VK_F4 )
{
COleVariant vtMissing; V_VT( &vtMissing) = VT_ERROR;
if ( m_g2antt.GetEditing() == 0 )
m_g2antt.Edit( vtMissing );
}
}
The following VB.NET sample starts editing the focused cell when user presses the F4 key:
Private Sub AxG2antt1_KeyDownEvent(ByVal sender As Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_KeyDownEvent) Handles AxG2antt1.KeyDownEvent
If (Convert.ToUInt32(e.keyCode) = Convert.ToUInt32(Keys.F4)) Then
AxG2antt1.Edit(Nothing)
End If
End Sub
The following C# sample starts editing the focused cell when user presses the F4 key:
private void axG2antt1_KeyDownEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_KeyDownEvent e)
{
if (Convert.ToUInt32(e.keyCode) == Convert.ToUInt32(Keys.F4))
axG2antt1.Edit(null);
}
The following VFP sample starts editing the focused cell when user presses the F4 key:
private void axG2antt1_KeyDownEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_KeyDownEvent e)
{
if (Convert.ToUInt32(e.keyCode) == Convert.ToUInt32(Keys.F4))
axG2antt1.Edit(null);
}