DataNavigatorIsValid Property

This property can be used to query the current row to see if it is valid

Definition

Namespace: EWSoftware.ListControls
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2023.4.9.0
public bool IsValid { get; }

Property Value

Boolean
Returns true if it is valid or there are no items, false if it is not

Remarks

This is useful in situations where the validating events are fired after certain other events (i.e. tree view and data grid item selection events). This raises the OnValidating(CancelEventArgs) and OnValidated(EventArgs) events on itself.

Example

C#
// Prevent a change of the tree view node if the current row in the
// data navigator is not valid.
private void tree_BeforeSelect(object sender, TreeViewCancelEventArgs e)
{
    e.Cancel = !dataNav.IsValid;
}

See Also