SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Cell editing is ending.
VB.NET | Private Sub object_EditEnding(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.EditEnding |
VB | Private Sub object_EditEnding(ByVal Window As OLE_HANDLE, ByVal vData As Variant, ByVal EditIndex As Long, ByVal EditCol As Integer, ByVal SaveInput As Boolean) |
C#.NET | void object_EditEnding(object sender, EventArgumentType e); |
VC++ | void OnEditEndingobject(OLE_HANDLE Window, const _variant_t& vData, long EditIndex, short EditCol, VARIANT_BOOL SaveInput); |
C | HRESULT OnEditEndingobject(OLE_HANDLE Window, VARIANT vData, long EditIndex, short EditCol, VARIANT_BOOL SaveInput); |
object
Window
The window handle of the control being used for cell editing.
vData
Application-specific data provided as vData argument when Cell.Edit was called.
EditIndex
The zero-based index of the item being edited. 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.
SaveInput
True if the new input data should be saved in the tree control, False otherwise. The value of SaveInput was returned by the application's EditValidate event as InputValid argument.
The EditEnding event occurs when cell editing is ending.
This event occurs every time cell editing for one cell is about to end. This event should only be used to save input data in the tree control and to hide and disable the control used for cell editing. This event should not take any other action or update the tree control in any other way. If the control is in virtual mode, the VirtualItemChanged method can be used to mark the item and cell as modified.
SftTree/OCX automatically hides and disables the control used for cell editing based (the Window handle provided in the EditInitializing event). However, many environments (including .NET) and ActiveX controls require that the application hide and disable controls explicitly.
After the EditEnding event occurs, another cell could be edited automatically as the result of cell navigation.
The EditValidate event can be used to validate the contents of the cell being edited. The EditValidate event precedes the EditEnding event.
The EditEnded event occurs once cell editing has completely ended.
End If S = S.Trim() If S.Length <= 0 Then MessageBox.Show("Just to demonstrate data input validation, this example rejects empty cells. Please enter some data.") e.inputValid = False End If End Sub Private Sub AxSftTree1_EditEnding(ByVal sender As Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_EditEndingEvent) Handles AxSftTree1.EditEnding ' Save the new cell contents If e.saveInput Then If e.vData Is Text1 Then AxSftTree1.get_Cell(e.editIndex, e.editCol).Text = Text1.Text Else AxSftTree1.get_Cell(e.editIndex, e.editCol).Text = Combo1.Text End If
End If S = Trim(S) If Len(S) <= 0 Then MsgBox ("Just to demonstrate data input validation, this example rejects empty cells. Please enter some data.") InputValid = False End If End Sub Private Sub SftTree1_EditEnding(ByVal Window As stdole.OLE_HANDLE, ByVal vData As Variant, ByVal EditIndex As Long, ByVal EditCol As Integer, ByVal SaveInput As Boolean) ' Save the new cell contents If SaveInput Then If Window = Text1.hwnd Then SftTree1.Cell(EditIndex, EditCol).Text = Text1.Text Else SftTree1.Cell(EditIndex, EditCol).Text = Combo1.Text End If
s = Combo1.Text; s = s.Trim(); if (s.Length <= 0) { MessageBox.Show("Just to demonstrate data input validation, this example rejects empty cells. Please enter some data."); e.inputValid = false; } } private void axSftTree1_EditEnding(object sender, AxSftTreeLib75._DSftTreeEvents_EditEndingEvent e) { // Save the new cell contents if (e.saveInput) { if (e.vData == Text1) { axSftTree1.get_Cell(e.editIndex, e.editCol).Text = Text1.Text; } else { axSftTree1.get_Cell(e.editIndex, e.editCol).Text = Combo1.Text; }
m_Combo1.GetWindowText(str); str.TrimLeft(); if (str.GetLength() <= 0) { AfxMessageBox(_T("Just to demonstrate data input validation, this example rejects empty cells. Please enter some data.")); *InputValid = VARIANT_FALSE; } } void CCellEditingDlg::OnEditEndingSftTree1(long Window, const VARIANT FAR& vData, long EditIndex, short EditCol, BOOL SaveInput) { // Save the new cell contents if (SaveInput) { CString str; if ((HWND)Window == m_Edit1.m_hWnd) m_Edit1.GetWindowText(str); else
See Also SftTree Object | Object Hierarchy