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

Customize group header

1 Answer 280 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 03 Apr 2013, 11:20 PM
Hi I am trying to customize the look of the group header with the use of data templates. When ever I do this no group header is displayed. I have tried to to use the Group Header template selector and to modify content template within the style selector both have th same results.  Here is the xmal I am trying to use. I have verified that the event creation style is being applied.
<ecu:GroupHeaderStyleSelector x:Key="GroupHeaderStyleSelector">
            <ecu:GroupHeaderStyleSelector.DateStyle>
                <Style TargetType="telerik:GroupHeader">
                    <Setter Property="Visibility" Value="Collapsed"/>
                </Style>
            </ecu:GroupHeaderStyleSelector.DateStyle>
            <ecu:GroupHeaderStyleSelector.EventCreationStyle>
                <Style TargetType="telerik:GroupHeader">
                    <Setter Property="Visibility" Value="Visible"/>
                    <Setter Property="Height" Value="100"></Setter>
                    <Setter Property="VerticalAlignment" Value="Top">
                    </Setter>
                    <Setter Property="ContentTemplate">
                        <Setter.Value>
                            <DataTemplate>
                                <TextBlock>Audio</TextBlock>
                            </DataTemplate>
                        </Setter.Value>
                    </Setter>
                    <!--<Setter Property="Template" Value="{StaticResource Testing}"></Setter>-->
                </Style>
            </ecu:GroupHeaderStyleSelector.EventCreationStyle>
        </ecu:GroupHeaderStyleSelector>

On the control I am doing the following 
<telerik:RadScheduleView Grid.Row="2"
                                 DialogClosing="eventsTimeline_DialogClosing_1"
                                  
                             AppointmentsSource="{Binding Events, Mode=TwoWay}"
                             NavigationHeaderVisibility="Collapsed"
                             ShowDialog="RadScheduleView_ShowDialog"
                             ResourceTypesSource="{Binding EventTypes}"                            
                             TimeRulerItemStyleSelector="{StaticResource TimeRulerItemStyleSelector}"
                             GroupHeaderStyleSelector="{StaticResource GroupHeaderStyleSelector}"
                             
                             AppointmentEditing="RadScheduleView_AppointmentEditing"
                             AppointmentSaving="eventsTimeline_AppointmentSaving" 
                             AppointmentCreating="eventsTimeline_AppointmentCreating_1"
                             AppointmentCreated="eventsTimeline_AppointmentCreated"
                             AppointmentSelectionChanged="eventsTimeline_AppointmentSelectionChanged_1"
                             AppointmentDeleting="eventsTimeline_AppointmentDeleting_1"
                             AppointmentDeleted="eventsTimeline_AppointmentDeleted_1"
                             DeleteAppointmentConfirmDialogStyle="{StaticResource DeleteEventConfirmDialogStyle}"
                             ResizeHighlightStyle="{StaticResource EventResizeHighlightStyle}"
                             Name="eventsTimeline" VerticalAlignment="Top">
            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:DayViewDefinition
                    VisibleDays="1"
                    MajorTickLength="5min"
                    MinorTickLength="1min"
                    MinTimeRulerExtent="5000"
                    TimerulerMajorTickStringFormat="{}{0: HHmm}"
                    DayStartTime="00:00:00" DayEndTime="3:00:00" Orientation="Horizontal">
                </telerik:DayViewDefinition>
            </telerik:RadScheduleView.ViewDefinitions>
 
            <telerik:RadScheduleView.DragDropBehavior>
                <ecu:EventCreationDragDropBehavior />
            </telerik:RadScheduleView.DragDropBehavior>
 
            <telerik:RadScheduleView.AppointmentStyleSelector>
                <ecu:EventStyleSelector
                        AudioEventStyle="{StaticResource AudioEvent}"
                        OdorEventStyle="{StaticResource OdorEvent}"
                        LightingEventStyle="{StaticResource LightingEvent}"
                        SmokeEventStyle="{StaticResource SmokeEvent}"/>
            </telerik:RadScheduleView.AppointmentStyleSelector>
 
            <telerik:RadScheduleView.GroupDescriptionsSource>
                <telerik:GroupDescriptionCollection>
                    <telerik:ResourceGroupDescription ResourceType="Event Types" />
                </telerik:GroupDescriptionCollection>
            </telerik:RadScheduleView.GroupDescriptionsSource>
        </telerik:RadScheduleView>

Everything worked as intended until I tried to modify the control template. When I tried using the template selector I got the exact same results.

1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 08 Apr 2013, 12:13 PM
Hi,

You can read our help article about Templating the GroupHeaders that describes the necessary steps needed in order to customize the GroupHeaders in the ScheduleView control and you can also check our online demo that demonstrates custom GroupHeaderTemplates.

Hope this information is helpful.

Greetings,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ScheduleView
Asked by
Josh
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Share this question
or