I have a hierarchical telerik gridview in Silverlight. This Grid shows a list of people (person objects). On the left most column, I have the expand button “+ sign.” When I click the “+ sign” expand button, the row expands and I can see a list of classes for that selection. Not all the rows need to expand (some have no list of classes). Therefore I only want to see the “+ sign” on the rows that have classes/details. How do I remove the expand button “+ sign” from the appropriate rows?
5 Answers, 1 is accepted
The expand button's visibility is controlled by the IsExpandable property of its parent row. If this property is set to false the button will not be shown.
This demon should give you a pretty good ideal about this approach.Best wishes,
the Telerik team
Datagrid in Xaml
In the event handler, the correct button content is displayed (+) or (-). Thus, the visibility of the childrow is set as needed. That's it.
Another example can be found here.