Hello,
I am trying to maintain group header template hierarchy to make group and sub-groups. I was able to use the example GroupingAndFilteringWithTreeView to understand how the grouping works. This is the simplified code that I was able to implement to see the grouping in action:
<telerik:RadScheduleView AppointmentsSource="{Binding Appointments}"> <telerik:RadScheduleView.ViewDefinitions> <telerik:TimelineViewDefinition StretchGroupHeaders="True" /> </telerik:RadScheduleView.ViewDefinitions> <telerik:RadScheduleView.GroupDescriptionsSource> <telerik:GroupDescriptionCollection> <telerik:ResourceGroupDescription ResourceType="Airlines" /> <telerik:ResourceGroupDescription ResourceType="Segregations" /> </telerik:GroupDescriptionCollection> </telerik:RadScheduleView.GroupDescriptionsSource> <telerik:RadScheduleView.ResourceTypesSource> <telerik:ResourceTypeCollection> <telerik:ResourceType Name="Airlines"> <telerik:Resource ResourceName="Airline 0" /> <telerik:Resource ResourceName="Airline 1" /> </telerik:ResourceType> <telerik:ResourceType Name="Segregations"> <telerik:Resource ResourceName="Segregation 0" /> <telerik:Resource ResourceName="Segregation 1" /> <telerik:Resource ResourceName="Segregation 2" /> </telerik:ResourceType> </telerik:ResourceTypeCollection> </telerik:RadScheduleView.ResourceTypesSource></telerik:RadScheduleView>Here, Appointments is just a new ObservableCollection with no appointments as AppointmentsSource.
This is the output I see:
Airline 0
- Segregation 0
- Segregation 1
- Segregation 2
Airline 1
- Segregation 0
Segregation 1
Segregation 2
What I see is that segregations are repeated for each Airline. And Both Airline and Segregation group headers template have the same Style and template applied to them.
However, I have a case where, for example, Airline 0 might have Segregation 3 and 4, whereas Airline 1 may have Segregation 5 and 6. I am trying to achieve this grouping:
Airline 0
Segregation 0
Segregation 1
Segregation 2
Airline 1
Segregation 3
Segregation 4
Segregation 5
Question 1: Can I achieve the above custom grouping behaviour? I was not able to find an example for it.
Question 2: If the above behaviour is possible, Can I have different templates for Airline and Segregation?
I hope I was able to explain my problem clearly. Looking forward to your reply.