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

[Solved] bind resources at runtime

1 Answer 143 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Emrah
Top achievements
Rank 1
Emrah asked on 09 Aug 2013, 06:52 PM
Greetings,
I have a problem with assigning data to schedule at code behind.
in html, i have already created a resourcetype for the schedule.

<ResourceTypes>
         <telerik:ResourceType ForeignKeyField="UserID" KeyField="UserID" TextField="fullname" Name="myResource" />
</ResourceTypes>
at the code behind, I can find the resourcetype and attach a dataset to it. however, although the grouping is done, the appointments are not shown, so I have to concatenate 2 datasets and assign them to scheduler as datasource (and this creates problems). How can I bind data to scheduler without using scheduler.datasource = dataset and scheduler.databind() mehtods ? because i want to add the second dataset as another resouce and
here is what i am using at the moment

public void BindSchedule()
       {
           DataSet ds2 = myObj.GetScheduleData(ddlGroup.SelectedValue);
 
           DataSet ds1 = myObj.EngineerDailyAssignmentGet(ddlGroup.SelectedValue);
 
           ds2.Merge(ds1);
           ResourceType t = radZeitPlan.ResourceTypes.FindByName("myResource") as ResourceType;
           t.DataSource = ds2;
            
           radScheduler.DataSource = ds1;
           radZeitPlan.DataBind();
            
           radZeitPlan.GroupBy = "myResource";
       }

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 15 Aug 2013, 05:09 AM
Hello Emrah,

 
When you use DataSource property of RadScheduler we strongly recommend the structure that we use in this on-line demo and that is explained in this help topic.

Hope this will help you solve the issue.

Regards,
Plamen
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Scheduler
Asked by
Emrah
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or