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

Passing arguments on new EventHandler

0 Answers 34 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
ConsumentenClaim
Top achievements
Rank 1
ConsumentenClaim asked on 27 Dec 2011, 01:19 PM
Hi,

I am trying to pass (DayRenderEventArgs) e to a newly created EventHandler. After searching on Google I found out that I could use "delegate" (?) to accomplish this, I couldn't find a proper example though...

Please see the next code:

protected void trcCalendarID_OnDayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
{
    foreach (Control control in trcCalendarID.Controls)
    {
        Button btnPlannen = (Button)control.FindControl("btnPlannenID");
        if (btnPlannen != null)
        {
            //btnPlannen.Click += new EventHandler(btnPlannen_Click); //Pass 'e' as argument/parameter here
        }
    }
}

No answers yet. Maybe you can help?

Tags
Calendar
Asked by
ConsumentenClaim
Top achievements
Rank 1
Share this question
or