DataListIsValid Property

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

Definition

Namespace: EWSoftware.ListControls
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.18.0+3a863295c73252b22e8ab6862ed6bdc57bcbd0fc
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 normal validating events are fired after certain other events (i.e. tree view and data grid item selection events).

Example

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

See Also