S
Sky Sigal
Hello:
I am designing a WebControl that swaps between a DayView, WeekView, or Month Schedule.
What I have done this time is to use CreateChildControls() to make a Pulldown that offers the view
type
but leave rendering of the actual calendar to PreRender(), where it reads the value of the DropDown
to decide what type of Table/TableRow/TableCells algorythm
to use (DayView = one column x many rows, WeekView, two columns, 4rows, etc...)
Wiring up an EventHandler for the Select/Dropdown was easy since it existed and was added to the
control hierarchy before Page_Load finished.
But I can't figure out how to catch clicks on the Cells, since they are generated after Page_Load,
and any buttons that I put in them, and attach EventHandlers to, are never called...
I can't make them before, because there are so many cells -- I don't think I should add a week view,
day view, month view to the control just to wire up an events to them, and then discard the layouts
I am not using. Would be insane and super slow/heavy.
I think that the idea would be IPostBackDataHandler -- but I am not sure how to wire it up.
If anybody has some experience with this -- man, that would really make my day. It seems that most
of the controls I want to do are being held up by this concept: making it so that rendering can
change shape -- yet be able to catch events from TextBox and buttons within the output.
Thanks so much!
Sky
I am designing a WebControl that swaps between a DayView, WeekView, or Month Schedule.
What I have done this time is to use CreateChildControls() to make a Pulldown that offers the view
type
but leave rendering of the actual calendar to PreRender(), where it reads the value of the DropDown
to decide what type of Table/TableRow/TableCells algorythm
to use (DayView = one column x many rows, WeekView, two columns, 4rows, etc...)
Wiring up an EventHandler for the Select/Dropdown was easy since it existed and was added to the
control hierarchy before Page_Load finished.
But I can't figure out how to catch clicks on the Cells, since they are generated after Page_Load,
and any buttons that I put in them, and attach EventHandlers to, are never called...
I can't make them before, because there are so many cells -- I don't think I should add a week view,
day view, month view to the control just to wire up an events to them, and then discard the layouts
I am not using. Would be insane and super slow/heavy.
I think that the idea would be IPostBackDataHandler -- but I am not sure how to wire it up.
If anybody has some experience with this -- man, that would really make my day. It seems that most
of the controls I want to do are being held up by this concept: making it so that rendering can
change shape -- yet be able to catch events from TextBox and buttons within the output.
Thanks so much!
Sky