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

How to call a postback from dynamically generated calendars

Asked by Rafael
16 years ago.
I generate different calendars in runtime depending on the amount of employees on a table.
Is there a way i can do postback events on those generated calendars or i have to use JavaScript on them?
Comment posted by Rafael
16 years ago.
The actual problem is how do i know from which calendar(employee) is the selected free time from.
Comment posted by Dan Letecky
16 years ago.
I think there should be no problem. If you generate a calendar dynamically, you also assign the event handler using something like

DayPilotCalendar1.TimeRangeSelected += new TimeRangeSelectedEventHandler(yourHandler);

Even if yourHandler method is the same for all calendar instances, you should always be able to detect it from sender parameter:
void yourHandler(object sender, TimeRangeSelectedEventArgs e)
{
DayPilotCalendar cal = (DayPilotCalendar) sender;
// your code here
}
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.