Slot selection with resource grouping

2 posts, 0 answers
  1. Rishabh
    Rishabh avatar
    10 posts
    Member since:
    Jun 2012

    Posted 10 Oct 2012 Link to this post

    Hi,

    I have an application where a certain number of resources are loaded into the ScheduleView. The requirement is that when the ScheduleView is loaded a slot must already be selected.

    If there are now resources, I'm able to achieve this with the following code:
    scheduleView.SelectedSlot = new Slot(now, now.AddMinutes(30));

    But the same code doesn't select any slot when there are resources in the ScheduleView.
    Can you please help on this?


    Thanks,
    Rishabh
  2. Rishabh
    Rishabh avatar
    10 posts
    Member since:
    Jun 2012

    Posted 10 Oct 2012 Link to this post

    This is unbelievable!

    I had tried everything that had crossed my mind to achieve the above functionality but nothing seemed to work until the time I posted this question.

    Here's the thing that I was missing earlier:

    var newSlot=new Slot(now, now.AddMinutes(30));
    newSlot.Resources.Add(MyResources.FirstOrDefault());
    scheduleView.SelectedSlot = newSlot;


    now this works!
  3. DevCraft banner
Back to Top