Multiple ResourceHeaderTemplates in Scheduler

2 posts, 0 answers
  1. Michael
    Michael avatar
    5 posts
    Member since:
    Sep 2013

    Posted 28 Oct 2013 Link to this post

    Hi,

    I was wondering if it's possible to have multiple ResourceHeaderTemplates in a Scheduler and let the correct one be chosen based on the Resource's Resource Type? I'd like to do it in markup if that is possible. 
    Something like (this is not valid markup):

    <ResourceHeaderTemplates>
        <ResourceHeaderTemplate ResourceType="1">
            <div class="rsMainHeader" style="text-align: left;" >
                <a href="<%# Eval("Url") %>" ><%# Eval("Text") %></a>
                <br/>
                <label id="projectLeaderLabel" runat="server" ></label>
                <label id="participantsLabel" runat="server" ></label>
            </div>
        </ResourceHeaderTemplate>
        <ResourceHeaderTemplate ResourceType="2">
            <div class="rsMainHeader" style="text-align: left;" >
                <%# Eval("Text") %>
            </div>
        </ResourceHeaderTemplate>
    </ResourceHeaderTemplates>
  2. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 31 Oct 2013 Link to this post

    Hi Michael,

    The functionality as you are describing it in not supported by RadScheduler. You can however use the OnResourceHeaderCreated event to customize the template based on the resource that triggered the event. The following demo demonstrates how this approach is used to load a different picture for each resource:
    http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourcegrouping/defaultcs.aspx


     

    Regards,
    Bozhidar
    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.

Back to Top