Neat and easy c# way to add "rows"

2 posts, 1 answers
  1. Patrick
    Patrick avatar
    11 posts
    Member since:
    Aug 2012

    Posted 12 Jan 2012 Link to this post

    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#.
  2. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 17 Jan 2012 Link to this post

    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 >>
  3. DevCraft banner
Back to Top