Grouping TimeSlots

6 posts, 0 answers
  1. Paul
    Paul avatar
    113 posts
    Member since:
    May 2009

    Posted 18 Oct 2011 Link to this post

    Hi,
        Is it possible to group TimeSlots so in Day view where it normally shows (See normal.png) to be able to group or style it to look like Required.png.

    Thanks
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 19 Oct 2011 Link to this post

    Hello Paul,

    You can set MinorTickLength and MajorTickLength properties of the DayViewDefinition, but the timeruler will be divided into equal itntervals:

    <telerik:RadScheduleView.ViewDefinitions>
        <telerik:DayViewDefinition>
            <telerik:DayViewDefinition.MinorTickLength>
                <telerik:FixedTickLengthProvider TickLength="02:00:00" />
            </telerik:DayViewDefinition.MinorTickLength>
            <telerik:DayViewDefinition.MajorTickLength>
                <telerik:FixedTickLengthProvider TickLength="02:00:00" />
            </telerik:DayViewDefinition.MajorTickLength>
        </telerik:DayViewDefinition>           
    </telerik:RadScheduleView.ViewDefinitions>

    Unfortunately,  you cannot have groups with different length.  We're sorry for the inconvenience.

    All the best,
    Yana
    the Telerik team

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

  3. DevCraft banner
  4. Paul
    Paul avatar
    113 posts
    Member since:
    May 2009

    Posted 19 Oct 2011 Link to this post

    Thanks for the quick reply.

    Is it possible to color code the slots as in the required.png file. Also to be able to add addional text.

    In the aspx radschedule there is a property for RowHeight is there such a property for the silverlight radscheduleview as knowing the row height for each time slot would be very useful.

    Thanks
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 21 Oct 2011 Link to this post

    Hi Paul,

    I've attached a simple example to demonstrate how you can style the needed TimeRulers using custom TimeRulerItemStyleSelector and TimeRulerItemTemplateSelector.

    Please download the attachment and give it a try.

    Regards,
    Yana
    the Telerik team

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

  6. Paul
    Paul avatar
    113 posts
    Member since:
    May 2009

    Posted 21 Oct 2011 Link to this post

    Thats almost Perfect thank you!

    How would I go about making it more dynamic by being able to supply the colour and text to it at run time instead of having to hard code a style for each slot. The reason being is I would not know what the colour or the text would be at design time as this would be user changable.

    Thanks
  7. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 26 Oct 2011 Link to this post

    Hello Paul,

    When you use the TimeRulerItemStyleSelector, the styles carry hard-coded values for the brushes.Setting the background color of time ruler items based on user preferences nearly impossible currently. If you need to change those values at runtime, the only way would be to remove and add style Setters dynamically. The latter is considered bad practice and is not recommended.

    I suggest that you stick to predefined background values rather than user-defined.


    Greetings,
    Yana
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top
DevCraft banner