This is a migrated thread and some comments may be shown as answers.

Turn Off GridViewToggleRowDetailsColumn When There Are No Details

1 Answer 181 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kelly
Top achievements
Rank 1
Kelly asked on 22 Sep 2011, 12:28 AM
I'm using a GridViewToggleRowDetailsColumn column. Most of my rows have no details. I don't want the +/- expander to show if a row has no details. The only way I've found to get rid of the expander for a given row is to set the GridViewToggleRowDetailsColumn cell's visibility to Collapsed in the RowLoaded handler. Seems VERY hacky. Is there a better way?

Sorry if I'm redundant. I've seen a few other threads in this forum with the same question, but the pointers in the responses either go nowhere, or refer to WPF projects that have no applicability in SL.

Thanks,

Kelly

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 22 Sep 2011, 08:23 AM
Hi Kelly,

You may try to predefine the CellTemplate of GridViewToggleButtonColumn and bind the Visibility of the RadToggleButton through a converter, which will be used for verifying whether there are row details or not. I am sending you a sample project illustrating this approach. Its proper implementation and style depends on your specific requirements, but still the idea should be the same.
 

All the best,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Kelly
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or