I have a custom treeview that inherits from System.Windows.Forms.TreeView. I want to validate the nodes whenever the focus changes on the treeview. I've tried the following code, but the OnValidating event never fires. The CausesValidation property is set to true on the CustomTreeView on my form.
public class CustomTreeView : TreeView
{
public CustomTreeView()
{
}
protected override void OnValidating(System.ComponentModel.CancelEventArgs e)
{
base.OnValidating(e);
}
}
Any help would be very much appreciated.
Thanks, Drew