4 Answers, 1 is accepted
Thank you for contacting us.
With the current implementation, RadScheduleView does not provide the desired by you functionality out of the box. The resources could only be re-arranged by reordering the Resources in the Resources collection itself. Please, check the attached sample that demonstrates that - by reordering the items in the ListBox the Resources are reorder either and this is the only approach that currently we could suggest you to use.
Regards,
Dinko
Progress Telerik
Thanks!
After sending the message I figured that it should be something like that...
I'll try and let you know. What I really want is to be able to directly drag the columns, but that will involve some kind of context when they are grouped... Well. Back to the desk.
HI.
Well, I have it working now.
But I just wanted to share that I didn't need to rebuild the whole list.
I just re-set the ResourceTypes collection, and it worked (which makes sense, since I bind the listbox ItemsSource to the resources list, which means that the resources are actually reordered).
So, instead of re-creating the resources list I just did:
void Resources_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if (e.NewItems != null)
{
var result = ResourceTypes;
ResourceTypes = null;
ResourceTypes = result;
}
}
Indeed your approach seems meaningful. You can just reset the ResourcesTypes collection as the ListBox is bound to it and when the CollectionChanged event is called the items are already reordered. You can use your approach if it fits into your main application.
Regards,
Dinko
Progress Telerik