Width of GroupHeaders

2 posts, 0 answers
  1. Matthias
    Matthias avatar
    6 posts
    Member since:
    Jan 2016

    Posted 26 Feb Link to this post


    is there a way to prevent the vertical weekview from showing horizontal scrollbars by narrowing the groupheaders to the available space? I also realized, that when you put a lot of appointments into one slot, this group gets more space than the others.

    What I want is, that every column has the exact same width and they use only the space available in the current window without horizontal scrolling.



  2. Yana
    Yana avatar
    4547 posts

    Posted 29 Feb Link to this post

    Hi Matthias,

    You could narrow the width of the GroupHeaders in WeekViewDefinition by customizing the GroupHeaderContentTemplateSelector of RadScheduleView,   you will need to set Width inside its HorizontalTemplate, please check the following snippet:

    <telerik:GroupHeaderTemplateSelector x:Key="GroupHeaderContentTemplateSelector">
                <!--Change the Width here-->
                <TextBlock Text="{Binding Name, StringFormat={}{0:ddd}}" Margin="2" Width="25"/>
                <ContentPresenter Content="{Binding FormattedName}" Margin="4" Height="16" VerticalAlignment="Top">
                        <RotateTransform Angle="-90"/>

    The approach is explained in details in Templating the GroupHeaders topic in our documentation.

    This, however, will not prevent having wider groups when there are more appointments, you could set MinAppointmentWidth property of the ScheduleView to a smaller value in order to avoid this to some extent:

    <telerik:RadScheduleView x:Name="radScheduleView"
        AppointmentsSource="{Binding Appointments}"                            
        GroupHeaderContentTemplateSelector="{StaticResource GroupHeaderContentTemplateSelector}"

    Hope this will be helpful.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top