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

disable row selection and rowdetailstemplate with converter

1 Answer 184 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 08 Dec 2014, 06:51 PM
I have a grid with:
CanUserSelect="True"
RowDetailsVIsibilityMode="VisibleWhenSelected"

My RowDetailsTemplate has a StackPanel with the Visibility set using a converter as so:

<telerik:RadGridView.RowDetailsTemplate  >
            <DataTemplate >
                              <StackPanel Orientation="Horizontal" Visibility="{Binding myVariable, Converter={StaticResource IsShownConverter}}" >


The converter is filtering properly, and only about 10% of my rows show something in the details template when selected.
The other 90% of rows when selected open a blank area underneath the row.
That is ok, but not aesthetically pleasing.

How would I use the converter (or some other method?), to only allow the selection and showing of rowdetails for rows where the converter conditions are met?

Thanks.







1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 09 Dec 2014, 08:44 AM
Hi,

In order to achieve your goal, you can use a RowStyleSelector where you can set which row will be expandable. You can check this online demo for a reference. The same example is available in your local copy of WPF demos.

Regards,
Yoan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Greg
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or