Determines whether a cell can be reached during cell editing.
| C# | void object_EditAllowed(object sender, EventArgumentType e); |
| VB.NET | Private Sub object_EditAllowed(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.EditAllowed |
| C++ | void OnEditAllowedobject(long ItemIndex, short ColIndex, VARIANT_BOOL* Allowed); |
| C | HRESULT OnEditAllowedobject(long ItemIndex, short ColIndex, VARIANT_BOOL* Allowed); |
| VB | Private Sub object_EditAllowed(ByVal ItemIndex As Long, ByVal ColIndex As Integer, Allowed As Boolean) |
object
EditIndex
The zero-based item index of the item to be tested for cell editing. The combination of EditIndex and EditCol describes an individual cell.
EditCol
The zero-based column number. The combination of EditIndex and EditCol describes an individual cell.
Allowed
Return True to allow editing of the specified cell, False otherwise.
The EditAllowed event determines whether a cell can be reached during cell editing.
It is called while a EditNavigate method is being processed, to determine whether a cell can be reached during cell editing. It is possible to suppress cell editing for items and cells using the Item.EditIgnore and Cell.EditIgnore properties. In addition, the EditNavigate method can be used to disallow editing of cells, even if the cell is otherwise editable.
If cell editing is suppressed for items and cells using the Item.EditIgnore and Cell.EditIgnore properties, the EditAllowed event does not occur for these items and cells.
Other than determining whether a cell can be reached during cell editing, this event should not take any other action or update the tree control in any way.
End If
End If
End Sub
Private Sub AxSftTree1_ToolTipVScroll(ByVal sender As Object, ByVal e As AxSftTreeLib80._DSftTreeEvents_ToolTipVScrollEvent) Handles AxSftTree1.ToolTipVScroll
e.text = "Item " & e.itemIndex & " - " & e.text
End Sub
Private Sub AxSftTree1_EditAllowed(ByVal sender As Object, ByVal e As AxSftTreeLib80._DSftTreeEvents_EditAllowedEvent) Handles AxSftTree1.EditAllowed
' Last chance to suppress cell editing for a cell
'If e.itemIndex = 1 And e.colIndex = 1 Then
' e.allowed = False
'End If
End Sub
Private Sub AxSftTree1_EditInitializing(ByVal sender As Object, ByVal e As AxSftTreeLib80._DSftTreeEvents_EditInitializingEvent) Handles AxSftTree1.EditInitializing
}
}
BEGIN_EVENTSINK_MAP(CCellEditingDlg, CDialog)
//{{AFX_EVENTSINK_MAP(CCellEditingDlg)
ON_EVENT(CCellEditingDlg, IDC_SFTTREE1, 4 /* ItemClick */, OnItemClickSftTree1, VTS_I4 VTS_I2 VTS_I2 VTS_I2 VTS_I2)
ON_EVENT(CCellEditingDlg, IDC_SFTTREE1, 5 /* ItemDblClick */, OnItemDblClickSftTree1, VTS_I4 VTS_I2 VTS_I2 VTS_I2 VTS_I2)
ON_EVENT(CCellEditingDlg, IDC_SFTTREE1, 28 /* ToolTipVScroll */, OnToolTipVScrollSftTree1, VTS_PBSTR VTS_I4 VTS_I2)
ON_EVENT(CCellEditingDlg, IDC_SFTTREE1, 44 /* EditAllowed */, OnEditAllowedSftTree1, VTS_I4 VTS_I2 VTS_PBOOL)
ON_EVENT(CCellEditingDlg, IDC_SFTTREE1, 38 /* EditInitializing */, OnEditInitializingSftTree1, VTS_PI4 VTS_PVARIANT VTS_I4 VTS_I2 VTS_PI4 VTS_PI4 VTS_PI4 VTS_PI4)
ON_EVENT(CCellEditingDlg, IDC_SFTTREE1, 39 /* EditInitialized */, OnEditInitializedSftTree1, VTS_I4 VTS_VARIANT VTS_I4 VTS_I2 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_PBOOL)
ON_EVENT(CCellEditingDlg, IDC_SFTTREE1, 43 /* EditNavigating */, OnEditNavigatingSftTree1, VTS_I4 VTS_I2 VTS_I4 VTS_I2)
ON_EVENT(CCellEditingDlg, IDC_SFTTREE1, 37 /* EditValidate */, OnEditValidateSftTree1, VTS_I4 VTS_VARIANT VTS_I4 VTS_I2 VTS_PBOOL)
ON_EVENT(CCellEditingDlg, IDC_SFTTREE1, 36 /* EditEnding */, OnEditEndingSftTree1, VTS_I4 VTS_VARIANT VTS_I4 VTS_I2 VTS_BOOL)
//}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()See Also SftTree Object | Object Hierarchy