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

Editing check box in apointment content template

3 Answers 63 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Igor Stefanovic
Top achievements
Rank 1
Igor Stefanovic asked on 14 May 2012, 10:51 AM

 

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.

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 16 May 2012, 02:07 PM
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 >>

0
Igor Stefanovic
Top achievements
Rank 1
answered on 17 May 2012, 10:25 AM
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
0
Accepted
Dani
Telerik team
answered on 23 May 2012, 09:38 AM
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 >>
Tags
ScheduleView
Asked by
Igor Stefanovic
Top achievements
Rank 1
Answers by
Yana
Telerik team
Igor Stefanovic
Top achievements
Rank 1
Dani
Telerik team
Share this question
or