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

DetailsPresenter with RowDetailsTemplateSelector

4 Answers 173 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jc
Top achievements
Rank 1
Jc asked on 05 Nov 2012, 12:00 PM
Hi guys,

I would like to display my RadGridView row details outside of the RadGridView (working with RadControls for WPF Q3 2012
).
I found some samples implementing the DetailsPresenter + DetailsProvider pointing to the RadGridview's RowDetailsProvider.
I tryed to implement it working with my RadGridView's RowDetailsTemplateSelector but the rowdetail still display inside the Grid, below the selected row. 

I tried another solution, setting the DetailsPresenter's "ContentTemplateSelector" instead of the RadGridView's RowDetailsTemplateSelector. In that particular case, the External DetailsPresenter does not bind to Selected Row Data: nothing is displayed in the details.

Any idea how I'm supposed to implement that?
Thanx' for your help.
JC

4 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 05 Nov 2012, 12:17 PM
Hello,

Did you follow this article to set up your external details presenter?

What is the RowDetailsVisibility of your grid. It should be Collapsed if you do not want to view the row details beneath each row.

Regards,
Rossen Hristov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jc
Top achievements
Rank 1
answered on 05 Nov 2012, 12:28 PM
Yes, I did follow the article. Setting the RowDetailsVisibilityMode="Collapsed" hides the details inside the grid. But the DetailsPresenter still not displays the details requested on row click. Here is the code:

<telerik:RadGridView x:Name="grid1" 
                                 ItemsSource="{Binding SearchItems}" 
                                 IsReadOnly="False"  
                                 SelectedItem="{Binding SelectedItem}"
                                 CanUserSelect="True"
                                 RowDetailsTemplateSelector="{StaticResource SearchItemTemplateSelector}"
                                 RowDetailsVisibilityMode="Collapsed">
...

            </telerik:RadGridView>

<Border Grid.Row="1" x:Name="externalDetailsBorder" BorderBrush="#ff0000" BorderThickness="5">
                <telerik:DetailsPresenter x:Name="ExternalPresenter" 
                                          DetailsProvider="{Binding RowDetailsProvider, ElementName=grid1}" />
            </Border>
0
Rossen Hristov
Telerik team
answered on 05 Nov 2012, 12:48 PM
Hi,

Can you please send me a small dummy sample project with your exact setup which I could run and debug to see what is going on. You can open a new support ticket in order to attach the project.

Thanks in advance.

All the best,
Rossen Hristov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jc
Top achievements
Rank 1
answered on 05 Nov 2012, 01:25 PM
I found what was wrong: a problem in the template selector.
The code works perfectly.

Thank you!
Regards,
JC
Tags
GridView
Asked by
Jc
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Jc
Top achievements
Rank 1
Share this question
or