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

Questions

2 Answers 59 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Dani
Top achievements
Rank 1
Dani asked on 16 Dec 2011, 03:08 PM
I have one database with two tables, named Event1 and Event2. 

I now have:

<telerik:RadScheduler runat="server" ID="RadScheduler1" Width="748px" SelectedDate="2007-03-30"<br>            DayStartTime="08:00:00" DayEndTime="18:00:00" DataKeyField="ID" DataSubjectField="Subject"<br>            DataStartField="Start" DataEndField="End" DataRecurrenceField="RecurrenceRule"<br>            DataRecurrenceParentKeyField="RecurrenceParentID" <br>            DataSourceID="EntityDataSource1" ><br>            <ResourceTypes><br>                <telerik:ResourceType KeyField="ID" Name="Event1" TextField="Text1" ForeignKeyField="ID"<br>                    DataSourceID="EntityDataSource1" /><br>                <telerik:ResourceType KeyField="ID" Name="<span style="font-size: 14px; ">Event2</span>" TextField="Text2" ForeignKeyField="ID"<br>                    DataSourceID="EntityDataSource2" /><br>            </ResourceTypes><br>        </telerik:RadScheduler>


I have some questions:

1. What is the method GetResources(ISchedulerInfo schedulerInfo) for? What would I get if I override it?
2. In the code above, I know that the KeyField is the primary key of the table, the ForeignKeyField  is the foregin key, but what column of the table represents the TextField attribute?
3. How to define the tables as different resources?
4. How to make different color of the events from the second table but not with javascript, but as resources?

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 16 Dec 2011, 04:04 PM
Hi Dani,

To get a better understanding of RadScheduler's Data Binding and Resources, I recommend you review the related topics in the help - http://www.telerik.com/help/aspnet-ajax/scheduler-database-structure.html and the Defining Resource demo.

You can style appointments based on the assigned resource using ResourceStyleMapping as shown in this demo:
<ResourceStyles>
             <telerik:ResourceStyleMapping Type="User" Key="1" BackColor="YellowGreen" />
             <telerik:ResourceStyleMapping Type="User" Key="2" BackColor="Pink" />
             <telerik:ResourceStyleMapping Type="User" Key="3" BackColor="Azure" />
         </ResourceStyles>




Kind regards,
Peter
the Telerik team
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 their blog feed now
0
Dani
Top achievements
Rank 1
answered on 16 Dec 2011, 04:24 PM
Ok, I'll look.
Tags
Scheduler
Asked by
Dani
Top achievements
Rank 1
Answers by
Peter
Telerik team
Dani
Top achievements
Rank 1
Share this question
or