IsExpandedBinding and IsExpandableBinding
As of R1 2018 SP2 RadGridView exposes the IsExpandedBinding and IsExpandableBinding properties. Through it the expanded and expandable states of the rows can be synchronized with the view model. For the purpose of demonstrating this functionality, the following business model will be defined.
Example 1: Defining the business model
Example 2: Create sample data
IsExpandedBinding
This property controls whether the hierarchy should be expanded or not. Setting the bound property to true will result in expanding the given hierarchy.
Example 3: Binding the IsExpandedBinding to the business model
Figure 1: Expanding hierarchy through the IsExpandedBinding property
IsExpandableBinding
The visibility of the GridViewToggleButton can be controlled by setting the property value. For example, if there are no items present in the hierarchical collection, the bound property can be set to false thus, the toggle button will be hidden.