I have a Hierarchical grid (2 level deep). Just introduced a way to collapse all hierarchy by calling
CollapseAllHierarchyItems on the Grid.
Some of the child items are empty so I am using a conditional style selector to collapse the visibility of the expand button where an item is empty.
But upon calling the collapse all method my conditional style selector is ignored and I see expand buttons even on rows that are empty.
Question:
1 - Why does the grid show expand button if a row has no child item? Only for the user to expand and find out that data is empty. Is there a special flag to say "Make - IsExpandable - False - when data is empty"?
2 - How can I set IsExpandable to false for all rows that have children with empty dat?
<telerik:RadGridView.RowStyleSelector>
<telerik:ConditionalStyleSelector>
<telerik:StyleRule Condition="somedata = 'A'">
<Style TargetType="gridView:GridViewRow" BasedOn="{StaticResource GridViewRowStyle}">
<Setter Property="IsExpandable" Value="True" />
</Style>
</telerik:StyleRule>
<telerik:StyleRule Condition="Not someData= 'A'">
<Style TargetType="gridView:GridViewRow" BasedOn="{StaticResource GridViewRowStyle}">
<Setter Property="IsExpandable" Value="False" />
</Style>
</telerik:StyleRule>
</telerik:ConditionalStyleSelector>
</telerik:RadGridView.RowStyleSelector>
TestRadGridView.CollapseAllHierarchyItems();