| Custom Repeater templates, drop down lists, and events not firing |
| Nathan Clinton posted at Wednesday, June 18, 2008 2:49 PM |
I've inherited a web app that has a dynamic form generator component. One of the dynamic form elements is a sub-page list, which is built through a Repeater control. Each of the items (sub-pages) in the repeater control is also built dynamically. There is an "Add" button in the Repeater's header and a "Delete" button per row (sub-page). These buttons (image buttons) bubble up their Command event to the Repeater, which handles the event. Everything works just--the events bubble up--until a DropDownList is added to sub-page (RepeaterItem). Once that DropDownList is added, the button's events do not fire. The page posts back, the controls are rebuilt, everything looks fine, but the event doesn't fire. ViewState isn't hitting the controls, either, so I'm guessing the Repeater is getting rebuilt somewhere after ProcessPostData. Anyway, the controls are built at init, so viewstate should kick in, right? Is there something special to DropDownLists that would unlink the events of the buttons? Both the Repeater and the DropDownLists are rebound on every postback. I've tried everything I can to get this to work (by the way, it worked in 1.1, but stopped when I converted to 3.5). Nothing has made any difference.
I'll post code if necessary, but it is VERY sloppy and lengthy.
Thanks in advance! |
 |
|
|
| |