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

Multiple ResourceHeaderTemplates in Scheduler

1 Answer 53 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 28 Oct 2013, 08:39 AM
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>

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 31 Oct 2013, 07:23 AM
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.
Tags
WebParts for SharePoint
Asked by
Michael
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or