Schedule view - Selection behavior

6 posts, 0 answers
  1. Subramanian
    Subramanian avatar
    6 posts
    Member since:
    Jan 2012

    Posted 27 Feb 2012 Link to this post

    Hello,

    I am trying to customize the template for schedule view but having issues figuring out in disabling the selection behaviour. Please find attached the screenshots. I would like to disable the user selection and also dont show the vertical border that is appearing in the pics.

    Appreciate help.

    Regards
    Subbu
  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 29 Feb 2012 Link to this post

    Hello Subramanian,

    To prevent the time slot selection, you can make your slots read-only. This is demonstrated in this online example. Also, be sure to check the help article on the same topic.

    If you wish to additionally hide the visualization of the mouse over effect on the slot, you can use the MouseOverHighlightStyle:

    <UserControl.Resources>
            <Style x:Key="MouseOverHighlightStyle" TargetType="telerik:HighlightItem">
                <Setter Property="Background" Value="Transparent" />
            </Style>
        </UserControl.Resources>
          
        <Grid Background="White">
      
            <telerik:RadScheduleView x:Name="sv" MouseOverHighlightStyle="{StaticResource MouseOverHighlightStyle}">
                <telerik:RadScheduleView.ViewDefinitions>
                    <telerik:DayViewDefinition />
                    <telerik:WeekViewDefinition />
                    <telerik:MonthViewDefinition/>
                    <telerik:TimelineViewDefinition/>
                </telerik:RadScheduleView.ViewDefinitions>
            </telerik:RadScheduleView>
      
        </Grid>

    I hope this helps.


    Greetings,
    Dani
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Subramanian
    Subramanian avatar
    6 posts
    Member since:
    Jan 2012

    Posted 29 Feb 2012 Link to this post

    Hello Dani,

    I am disabling all dialogs in my view so basically user cannot edit item which makes it read only.

    I am not able to disable the visualization with the code style you mentioned below.  Let me know if i miss something

    Regards
    Subramanian.V.V.
  5. Dani
    Admin
    Dani avatar
    848 posts

    Posted 01 Mar 2012 Link to this post

    Hi Subramanian,

    Disabling the display of dialogs is also an option. If you wish to additionally hide the mouse over and selected states of the slots, you should use the MouseOverHighlightStyle and SelectedHighlighjtStyle attached properties of RadScheduleView.

    Why are you unable to apply these styles? Can you share a code snippet or a sample?

    Regards,
    Dani
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  6. Subramanian
    Subramanian avatar
    6 posts
    Member since:
    Jan 2012

    Posted 03 Mar 2012 Link to this post

    Hello Dani,

    I figured out the issue. It looks like i have to set both the selectionhightlight style and mouse over highlight style.

    Also i would like to get clarifications on errors i see in VS IDE to ensure it is not related to telerik controls. I create a separte styles .xmal file and add it as resource (build action) to project. This file contains the custom styles for radscheduleview control. IDE always show these two errors

    Type 'local:RadScheduleViewCommands' was not found. D:\Incubation\Blendtesting\SL50Project\RadScheduleViewStyles.xaml 127 21 SL50Project

    An error occurred while finding the resource dictionary "RadScheduleViewStyles.xaml". D:\Incubation\Blendtesting\SL50Project\RadScheduleViewTest.xaml 14 17 SL50Project

    But application works fine runtime applying the styles correctly.

    Regards
    Subramanian.V.V.
  7. Dani
    Admin
    Dani avatar
    848 posts

    Posted 08 Mar 2012 Link to this post

    Hi Subramanian,

    Make sure the local namespace points to the following:
    xmlns:local="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"

    What syntaxt do you use to merge the resource dictionary into your project?

    Regards,
    Dani
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
DevCraft banner