Special Slots and Custom Grouping

6 posts, 0 answers
  1. Daniel
    Daniel avatar
    9 posts
    Member since:
    Oct 2006

    Posted 08 Jul 2012 Link to this post

    Hi,
    I followed more or less the example "Special and Read-only Slots"
    in order to achieve the desired behavior (show working hours in a different color).
    As you can see in the first screen shot (sched01.png), everything works fine.

    As soon as I use custom grouping, the working hours are no more visible (see sched02.png).
    After deselecting the group item (here: Zimmer 315), the working hours for the selected person are displayed again.

    Your help is highly appreciated.

    Regards,
    Daniel

  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 09 Jul 2012 Link to this post

    Hi Daniel,

    You should also add resources by which you're grouping, to the Resources collection of the special slots. As it is seen from the screenshot, "Zimmer 315" resource should be defined for the slots.

    Hope this helps.

    Regards,
    Yana
    the Telerik team

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

  3. UI for WPF is Visual Studio 2017 Ready
  4. Daniel
    Daniel avatar
    9 posts
    Member since:
    Oct 2006

    Posted 09 Jul 2012 Link to this post

    Hi Yana

    Thank you for your response. Maybe I am wrong, but I thought, when I do the grouping first by "Zimmer 315" (Zimmer = room) and then by person (Manfred xxx), only latter special slot will be displayed. Otherwise, it would not make sense, since there will be tow "overlapping" different slots, one for room and one for person.

    Regards,
    Daniel
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 11 Jul 2012 Link to this post

    Hello Daniel,

    Actually you can set multiple resources to a single Special Slot:

    newSlot.Resources.Add(new Resource("Manfred","Person"));
    newSlot.Resources.Add(new Resource("Zimmer 315", "Zimmer"));

    all the resources by which the view is grouped should be set to the special slot.

    All the best,
    Yana
    the Telerik team

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

  6. Daniel
    Daniel avatar
    9 posts
    Member since:
    Oct 2006

    Posted 12 Jul 2012 Link to this post

    Hi Yana

    Thank you very much, it's working fine for this particular case now.

    But...
    Given the follwoing scenario:
    - Resource "Manfred(Person)" has an availability (e.g. working hours) from 9:00 to 17:00 on July 12th.
    - Resource "Zimmer 315(Zimmer)" is free (e.g. can be booked) from 12:00 to 22:00 on July 12th.
    Now when I group by Person and then by Zimmer, I'd like to see the special slot 12:00 to 22:00 on July 12th.
    When I group first by Zimmer and then by Person, I'd like to see the special slot 9:00 to 17:00 on July 12th, respectively.
    That is, the very last grouping criteria "overrides" all other special slots.

    Any hints?

    Best regards
    Daniel
  7. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 16 Jul 2012 Link to this post

    Hi Daniel,

    I am afraid that there is no easy way to handle this scenario. I guess that you should clear all the special slots, than manually merge the hours according to the resource grouping and add the final special slots again.

    The other option I would suggest is to create a custom ViewDefinition for each room as demonstrated in the this online example ( the same is available in WPF demos) and to group only by Person resource.

    Regards,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready