all groups > asp.net building controls > march 2005 >
You're in the

asp.net building controls

group:

Extending Calendar to add Day Click Event


Extending Calendar to add Day Click Event nileblitz NO[at]SPAM gmail.com
3/7/2005 6:06:00 AM
asp.net building controls:
Hello,

I am trying to extend the Calendar Control to add a event for a Day
Click.
Currently we have a "SelectionChanged" event.
I would like an event to be fired on "DayClick"

I extended the calendar control and added the following
//
public event EventHandler DayClick;

protected void OnDayClick(object sender, System.EventArgs e)
{
if(DayClick != null)
DayClick(sender, e);
}
//

I added the extended calendar control to a user control and added the
following code there
//
this.ncalVis.DayClick += new
System.EventHandler(this.ncalVis_DayClick);

protected void ncalVis_DayClick(object sender, System.EventArgs e)
{
//Event Fired
}
//

Surely I dont understand the event stuff good enough.
How do I join the clicking on a day link in a calendar to the event
that I have declared???

Re: Extending Calendar to add Day Click Event MasterGaurav
3/7/2005 8:08:48 AM
You are absolutely correct.
The issue remains: When is it invoked? You'll need to override the code
for "Render" method where you'll need to generate the required html
code.

--
Cheers,
Gaurav Vaish
http://www.mastergaurav.org
http://mastergaurav.blogspot.com
---------------------------
AddThis Social Bookmark Button