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

Resource Template - Server-side access?

2 Answers 59 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Scott Ellison
Top achievements
Rank 1
Scott Ellison asked on 12 Sep 2008, 02:54 PM

When creating a resource header template on the ASPX page, how do you access the template on the server-side?  For instance, I have the below in my ASPX page:

                        <ResourceHeaderTemplate>

                            <asp:Label ID="lblResName" runat="server" Text='<%# Eval("Text") %>' ></asp:Label>

                        </ResourceHeaderTemplate>

I would like to format the “text” of my resources by setting the CSSClass of the label server-side.

2 Answers, 1 is accepted

Sort by
0
Scott Ellison
Top achievements
Rank 1
answered on 12 Sep 2008, 06:12 PM
Actually, I figured it out..

To access the resource on the server-side, you called a server-side function and passed in the container object…

                        <ResourceHeaderTemplate>

                            <%# FormatFreelancer(Container.Resource) %>

                        </ResourceHeaderTemplate>

HTH somebody else in the future...

0
T. Tsonev
Telerik team
answered on 15 Sep 2008, 07:35 AM
Hi Scott,

Thank you for submitting this workaround. We will add a ResourceHeaderCreated event in the Q3 version, so it will be easier to modify the templates with code.

Sincerely yours,
Tsvetomir Tsonev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
Scott Ellison
Top achievements
Rank 1
Answers by
Scott Ellison
Top achievements
Rank 1
T. Tsonev
Telerik team
Share this question
or