This is a migrated thread and some comments may be shown as answers.

Neat and easy c# way to add "rows"

1 Answer 28 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 12 Jan 2012, 04:48 PM
I'm looking to use the RadScheduleView for something more than it does by default.
Your example here comes close in one way... it supports individual rows with a timeline and appointments for each person.
i.e. John has his timeline and appointments, Smith has his too.

Can you please tell me how to add "rows" (with their headings) at runtime, c# code. <- For which I can then add appointments (which I already know how to do).

The source for the above example does it by adding resource types in xaml. I'm hoping there's a plain vanilla, simpler and better way of implementing this... in c#.

1 Answer, 1 is accepted

Sort by
0
Accepted
Konstantina
Telerik team
answered on 17 Jan 2012, 01:00 PM
Hello,

You can easily add resources once you have bound the ResourceTypesSource to a collection, for example:

ObservableCollection<ResourceType> resourceTypes = newObservableCollection<ResourceType>(); 
this.scheduleView.ResourceTypesSource = resourceTypes; 
ResourceType room = newResourceType(); 
room.Name = "Room"
room.Resources.Add(newResource() { ResourceName="Room 1"}); 
resourceTypes.Add(room);

More information about the resources you can find in our online documentation and in these online demos:


Hope this helps.

All the best,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
ScheduleView
Asked by
Patrick
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Share this question
or