Hi,
I am trying to show a grid view inside each group's data .Once user will group data and will expand a group header it will show a grid view inside that GridViewGroupRow and will not show rows for that particular group.
I was trying to find some sample but i am not able to get that.How i should approach this scenario.
Modi
5 Answers, 1 is accepted
I would need a bit more information about your scenario so that I could provide you with a better solution. Are you trying to achieve some kind of hierarchy or to add details for a particular row? You may find an example for hierarchy and for RowDetails in our demos.
Furthermore, an examples about grouping can be also encountered in both the documentation and in the demos.
Maya
the Telerik team
Yes i am trying to achieve some kind of Hierarchy but i want to use this hierarchy only in case of grouping.
When user is not grouping data in that case i want to show rows to user in a normal way.In case user is grouping data in that case i want to show only group headers in group details template and want to show rows for that particular group in another radgrid which will display records once user will expand that particular group.
Let me know if you need more details .
Thanks,
Modi
I am sending you a sample project implementing the requirements you have described. I hope it meets your expectations.
Maya
the Telerik team
Thanks Maya for the sample.
It really helped me but i am trying to achieve below scenario in the sample you have sent:
1. I want the grid to come just below the group.Currently it is coming at the bottom of the screen.
2. I don't want group summary to come in case user is clicking top level group.
In my sample I have templated the grid view group template and removed GridViewVirtualizingPanel panel.and added a grid below that as shown in the code snippet below.But problem with this approach is that if i am grouping based on multiple column i am not getting group header for level 2 group.For grouping based on single column it is working fine.
<Border x:Name="Content" Grid.ColumnSpan="5" Grid.Column="0" Grid.Row="1" Visibility="Collapsed">
<StackPanel>
<!--<telerik:GridViewVirtualizingPanel x:Name="PART_GridViewVirtualizingPanel">
</telerik:GridViewVirtualizingPanel>-->
<telerik:RadGridView RowDetailsTemplate="{StaticResource InfoDetailsTemplate}" RowDetailsVisibilityMode="VisibleWhenSelected" Margin="23,0,0,0" MaxHeight="200" ShowGroupPanel="False" ShowColumnHeaders="False" >
</telerik:RadGridView>
</StackPanel>
</Border>
Please let me know how i should proceed to resolve above mentioned issues.
Thanks,
Modi
Unfortunately, the scenario you want to achieve is quite undesirable. Basically, you can change the Template for the groups, but you will loose a lot of the functionality supported by the grid. Thus, I would recommend to use basic group implementation, hierarchy or row details.
You may find a lot of explanations, examples and sample projects for all those typical scenarios in our online documentation, demos and blogs.
Maya
the Telerik team