3 posts, 0 answers
  1. Dani
    Dani avatar
    20 posts
    Member since:
    Dec 2011

    Posted 16 Dec 2011 Link to this post

    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. Peter
    Peter avatar
    6637 posts

    Posted 16 Dec 2011 Link to this post

    Hi Dani,

    To get a better understanding of RadScheduler's Data Binding and Resources, I recommend you review the related topics in the help - and the Defining Resource demo.

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

    Kind regards,
    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
  3. Dani
    Dani avatar
    20 posts
    Member since:
    Dec 2011

    Posted 16 Dec 2011 Link to this post

    Ok, I'll look.
Back to Top