Editing check box in apointment content template

4 posts, 1 answers
  1. Igor Stefanovic
    Igor Stefanovic avatar
    10 posts
    Member since:
    May 2010

    Posted 14 May 2012 Link to this post

     

    I am trying to use check box inside of appointment data template. Just to make clear, it's not appointment edit template style but data template of appointment is self. My goal is to allow selection of multiple appointments and then execute group action on all selected (like delete, approve or something like that). However check box is disabled and I can’t check or uncheck it.

     

    I try to set IsInlineEditingEnabled to true but  check box still stays disabled.

  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 16 May 2012 Link to this post

    Hi Igor,

    I've tested the described scenario but wasn't able to reproduce this issue.  Here is the code I used:

    <telerik:RadScheduleView
            AppointmentItemContentTemplate="{StaticResource CustomAppointmentItemTemplate}">
        <telerik:RadScheduleView.AppointmentsSource>
            <telerik:ObservableAppointmentCollection />
        </telerik:RadScheduleView.AppointmentsSource>
        <telerik:RadScheduleView.ViewDefinitions>      
            <telerik:WeekViewDefinition /> 
        </telerik:RadScheduleView.ViewDefinitions>
    </telerik:RadScheduleView>

    and the CustomAppointmentItemTemplate:

    <DataTemplate x:Key="CustomAppointmentItemTemplate">
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{Binding Subject}" TextWrapping="Wrap" TextTrimming="WordEllipsis" telerik:DragDropManager.AllowDrag="False" />               
            <CheckBox Content="test checkbox" />
        </StackPanel>
    </DataTemplate>

    Can you try it and let us know whether you're still experiencing the issue?

    Greetings,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Igor Stefanovic
    Igor Stefanovic avatar
    10 posts
    Member since:
    May 2010

    Posted 17 May 2012 Link to this post

    Thanks Yana

    I found out what is causing the problem. You have bug in Metro theme. Seem like grid  "MouseOverGrid" in "AppointmentItemHorizontalControlTemplate/AppointmentItemVerticalControlTemplate"  have border MouseOverVisual that is preventing click to pass trough:

    <Grid x:Name="MouseOverGrid" Visibility="Collapsed" Opacity="0">
                         
                        <!--Problematic border-->
                        <Border x:Name="MouseOverVisual" Background="{StaticResource StrongBrush}" Opacity="0.1" />
                         
                         
                        <Border x:Name="PART_StartResizeGrip" Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Stretch" Cursor="SizeWE" dragDrop:DragDropManager.AllowDrag="True" Width="6"
                            Visibility="{Binding IsAllDay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}" />
     
                        <Border x:Name="PART_EndResizeGrip" Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Stretch" Cursor="SizeWE" dragDrop:DragDropManager.AllowDrag="True" Width="6"
                            Visibility="{Binding IsAllDay, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
     
                        <telerik:RadButton x:Name="DeleteButton" Style="{StaticResource DeleteButtonStyle}"
                                        Command="local:RadScheduleViewCommands.DeleteAppointment"  ClickMode="Press"
                                        CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                        Visibility="{Binding RelativeSource={RelativeSource Self}, Path=IsEnabled, Converter={StaticResource BooleanToVisibilityConverter}}"                           
                                        IsTabStop="False" />
                    </Grid>

    I checked Black office theme and it works just fine since border MouseOverVisual is not even present there. You might want to check other Telerik.Windows.Controls.ScheduleView.xaml theme templates for this problem.

    Regards,
    Igor
  5. Answer
    Dani
    Admin
    Dani avatar
    848 posts

    Posted 23 May 2012 Link to this post

    Hello Igor,

    We were able to reproduce the appointment content template issue in Metro theme. It had already been reported and fixed in the latest LIB. The fix, however, relates to the horizontal orientation of appointments. Fix for the vertical orientation is done as well and will be available in the nearest LIB.

    We apologize if this has caused inconvenience in your scenario.

    Kind regards,
    Dani
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top