Occurs during cell editing when the user clicks a mouse button outside of the control used for cell editing.
Class: SftTree
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET
public event EditClickOutsideEventHandler EditClickOutside;
Public Event EditClickOutside As EditClickOutsideEventHandlerOccurs during cell editing when the user clicks a mouse button outside of the control used for cell editing.
This event is rarely used and is available to support some unusual controls for cell editing. Normally, while cell editing, if the user clicks anywhere outside of the control being used for cell editing, this ends cell editing and the EditValidate event occurs. Some unusual controls may be composed of multiple controls that are not necessarily child windows of the control used for cell editing. The EditClickOutside event can be used to determine whether the mouse click occurred within a window that is part of cell editing (the EndEditing field of the EditClickOutsideEventArgs instance is set to False) or outside.
private void sftTree1_EditAllowed(object sender, Softelvdm.SftTreeNET.EditAllowedEventArgs e) {
DumpValues("EditAllowed", e);
e.Allowed = (e.Cell.ColumnIndex == 2); // only edit cells in column 2
}
private void sftTree1_EditClickOutside(object sender, Softelvdm.SftTreeNET.EditClickOutsideEventArgs e) {
DumpValues("EditClickOutside", e);
}
private void sftTree1_EditEnded(object sender, Softelvdm.SftTreeNET.EditEndedEventArgs e) {
DumpValues("EditEnded", e);
// save the new cell text if necessary
if (e.SaveValue)
e.Cell.Text = textBox1.Text;
If e.Cell.ColumnIndex = 2 Then ' only edit cells in column 2
e.Allowed = True
Else
e.Allowed = False
End If
End Sub
Private Sub SftTree1_EditClickOutside(ByVal sender As System.Object, ByVal e As Softelvdm.SftTreeNET.EditClickOutsideEventArgs) Handles SftTree1.EditClickOutside
DumpValues("EditClickOutside", e)
End Sub
Private Sub SftTree1_EditEnded(ByVal sender As System.Object, ByVal e As Softelvdm.SftTreeNET.EditEndedEventArgs) Handles SftTree1.EditEnded
DumpValues("EditEnded", e)
' save the new cell text if necessary
If e.SaveValue ThenSee Also SftTree Class | Classes | SftTree/NET 3.0