This is a migrated thread and some comments may be shown as answers.
Slot selection with resource grouping
1 Answer 12 Views
This is a migrated thread and some comments may be shown as answers.
Rishabh
Top achievements
Rank 1
Rishabh asked on 10 Oct 2012, 12:04 PM
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

1 Answer, 1 is accepted

Sort by
0
Rishabh
Top achievements
Rank 1
answered on 10 Oct 2012, 12:14 PM
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!
Asked by
Rishabh
Top achievements
Rank 1
Answers by
Rishabh
Top achievements
Rank 1
Share this question
or