search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to make hyperlinks or linkbuttons the resources' names ?

Asked by Agustin
13 years ago.
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
Comment posted by Dan Letecky
13 years ago.
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 Agustin
13 years ago.
Thanks
Comment posted by Anonymous
11 years ago.

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

Comment posted by Dan Letecky
11 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.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.