Home Unanswered Active Tags New Question

How to make hyperlinks or linkbuttons the resources' names ?

I am adding dynamically the resources to the daypilotscheduler control, so , I need that each resource's name is a hyperlink or linkbutton in order to retrieve his resourceid and perform some actions.

How can I do that?

Thanks in advanced
Asked by Agustin 4 years ago.
Replies
It's not possible to put Hyperlink and LinkButton controls there but it's possible to render custom HTML (which can include any <a> links) using BeforeResHeaderRender event handler (by modifying e.InnerHTML).
Comment posted by Dan Letecky 4 years ago.
Thanks
Comment posted by Agustin 4 years ago.

Please Certain and one example for e.innnerHTML of BeforeResHeaderRender( about add link toResource). Thanks.

Comment posted by Anonymous 2 years ago.

You have two options for handling row header clicks:

1. Hyperlink

The following code will render a hyperlink in the resource header:

    protected void DayPilotScheduler1_BeforeResHeaderRender(object sender, DayPilot.Web.Ui.Events.BeforeHeaderRenderEventArgs e)
    {
        if (!e.IsCorner) // don't modify the upper-left corner
        {
            if (!DayPilotScheduler1.IsExport)  // required if you are using PNG Export
            {
                e.InnerHTML = String.Format("{1}", e.Value, e.Name);
            }
        }
    }

2. ResourceHeaderClick event

You can handle that event using PostBack:

ResourceHeaderClickHandling="PostBack"

or JavaScript:

ResourceHeaderClickHandling="JavaScript"

CallBack handling doesn't make much sense here, you wouldn't be able to redirect to another page.

Comment posted by Dan Letecky 2 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java