SftTree/OCX 7.5 Documentation

Display
Print

AfterEdit Event, SftTree Object

Cell editing is about to end.

Deprecated - Provided for compatibility with earlier versions only - See Cell Editing - This event continues to be used with Internet Explorer as it does not support the new cell editing mechanisms introduced with SftTree/OCX 5.0.

Syntax

VB.NETPrivate Sub object_AfterEdit(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.AfterEdit
VBPrivate Sub object_AfterEdit(CancelEdit As Boolean, NewString As String, ByVal CBIndex As Long, ByVal ItemIndex As Long, ByVal ColIndex As Integer)
C#.NETvoid object_AfterEdit(object sender, EventArgumentType e);
VC++void OnAfterEditobject(VARIANT_BOOL* CancelEdit, _bstr_t* NewString, long CBIndex, long ItemIndex, short ColIndex);
CHRESULT OnAfterEditobject(VARIANT_BOOL* CancelEdit, BSTR* NewString, long CBIndex, long ItemIndex, short ColIndex);

object

A SftTree object.

CancelEdit

Set to True to cancel the AfterEdit event and resume cell editing. Set to False to accept the text and end cell editing. By default, the value of Cancel on entry to the event handler is set to False.

NewString

The text as entered or selected by the user.

CBIndex

The index of the selection made in the combo box. This value is only valid if cell editing was started using StartCombo or StartComboEdit.

ItemIndex

The zero-based index of the cell being edited.

ColIndex

The column number of the cell being edited.

Comments

Deprecated - Provided for compatibility with earlier versions only - See Cell Editing - This event continues to be used with Internet Explorer as it does not support the new cell editing mechanisms introduced with SftTree/OCX 5.0.

The AfterEdit event occurs when cell editing is about to end.

The AfterEdit event occurs when the user clicks outside of the current cell being edited, the TAB or ENTER keys are pressed (see CellEventHandling) or if the EndEdit(True) method is used. The AfterEdit event allows the application to perform input validation. The new cell text NewString can be inspected and/or modified. If the text entered or selected is invalid, the Cancel variable can be set to True. This indicates that the value in NewString should not be accepted and cell editing is to be resumed. Setting Cancel to False (default), cell editing is ended and the text in NewString becomes the new cell text.

If the CellEventHandling property is set to True, the AfterEdit event will not be generated if the TAB or ENTER keys are pressed. The application must handle these keys explicitly using the CEKeyDown event and end cell editing using the EndEdit method.

NewString is passed by reference, so an application can change the string value before returning. If the string is changed, it is used as the new cell text if Cancel is False. If Cancel is True, the current edit control or combo box control text will be set to the value in NewString.

If cell editing is aborted by the user by pressing the ESCAPE key, the AfterEdit event is not generated. The PostEdit event can be used instead to perform additional processing.

The tree control properties cannot be modified during this event. If the tree control is updated in any way, cell editing is terminated. Use the PostEdit events to modify the cell contents.

If the control is in virtual mode, the AfterEdit event automatically calls the VirtualItemChanged method to mark the item as modified (if Cancel is False). The application should not use any methods (including VirtualItemChanged) while processing the event.

See Also SftTree Object | Object Hierarchy


Last Updated 04/28/2018 - (email)
© 2018 Softel vdm, Inc.