Similar to how Excel works, I'm looking for a way to have header text span multiple columns ... see image. Also needs to work with a "Freeze/scrolling" RadGrid.
Cheers, Rob.
3 Answers, 1 is accepted
I found the information on Nested column groups, but unfortunately it seems to contain a bug and I can't actually get my desired results.
Your example:
<telerik:RadGridView.ColumnGroups>
<telerik:GridViewColumnGroup Name="Level2group1">
<telerik:GridViewColumnGroup Name="Level1group11"/>
<telerik:GridViewColumnGroup Name="Level1group12"/>
</telerik:GridViewColumnGroup>
<telerik:GridViewColumnGroup Name="Level2group2">
<telerik:GridViewColumnGroup Name="Level1group21"/>
<telerik:GridViewColumnGroup Name="Level1group22"/>
</telerik:GridViewColumnGroup>
</telerik:RadGridView.ColumnGroups>
will generate "duplicate column Group name error" in the designer. This code below will work but doesn't produce the intended result:
<telerik:RadGridView.ColumnGroups>
<telerik:GridViewColumnGroup Name="Level2group1">
<telerik:GridViewColumnGroup Name="Level1group11"/>
<telerik:GridViewColumnGroup Name="Level1group12"/>
<telerik:GridViewColumnGroup Name="Level2group2">
<telerik:GridViewColumnGroup Name="Level1group21"/>
<telerik:GridViewColumnGroup Name="Level1group22"/>
</telerik:GridViewColumnGroup>
</telerik:GridViewColumnGroup>
</telerik:RadGridView.ColumnGroups>
Unfortunately this makes it impossible to have correctly associated nested column groups ... it's logically impossible. The example that doesn't work is indeed how I would logically expect the usage for Nested Column groups. So this is most likely a bug.
Cheers, Rob.
Hello Rob,
Thank you for the provided information.
I tested the example from the Column Groups article in a sample project on my end, however it works as expected and I was not able to replicate the mentioned error. That is why I am attaching the project that I used for testing purposes. May I ask you to check it out and see how it differs from the setup on your end?
Should you need any further assistance, can you modify the project in order to demonstrate your scenario and send it back? This will hopefully allow me to investigate further and better assist you.
I am looking forward to your reply.
Regards,
Vladimir Stoyanov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi Vladimir,
In your documentation link, scroll down to Sample 6, if I copy and paste that code into my XAML I get an error (see attached image).
Cheers, Rob.
I tested the same snippet in the sample project shared in my last reply, however I was not able to replicate this error. May I ask you to update the shared project in order to demonstrate your scenario and send it back? This will hopefully allow me to investigate further and better assist you.