Skip to main content
A newer version of this page is available. .

TreeListView.IsCheckBoxEnabledBinding Property

Gets or sets the binding that determines whether a node’s check box is enabled.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v19.2.dll

Declaration

public Binding IsCheckBoxEnabledBinding { get; set; }

Property Value

Type Description
Binding

The binding that determines whether a node’s check box is enabled.

Remarks

Specify the IsCheckBoxEnabledFieldName / IsCheckBoxEnabledBinding option to bind the enabled state of check boxes to a property.

Note

The IsCheckBoxEnabledBinding property takes precedence over the IsCheckBoxEnabledFieldName property.

Example

The code sample below shows how to bind the enabled state of check boxes to the Enabled field:

<dxg:GridControl Name="gridControl">
    <dxg:GridControl.Columns>
        <dxg:GridColumn FieldName="Name"/>
        <dxg:GridColumn FieldName="Department"/>
        <dxg:GridColumn FieldName="Position"/>
    </dxg:GridControl.Columns>
    <dxg:GridControl.View>
        <dxg:TreeListView KeyFieldName="ID" ParentFieldName="ParentID" AutoExpandAllNodes="True"
                          ShowCheckboxes="True" CheckBoxFieldName="OnVacation" IsCheckBoxEnabledBinding="{Binding Enabled}" /> />
    </dxg:GridControl.View>
</dxg:GridControl>
public class Employee {
    public int ID { get; set; }
    public int ParentID { get; set; }
    public string Name { get; set; }
    public string Position { get; set; }
    public string Department { get; set; }
    public bool OnVacation { get; set; }
    public bool Enabled { get; set; }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the IsCheckBoxEnabledBinding property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also