Monday, March 26, 2012

Modal Popup Problem Inside Multiview

I have a multiview with six views. Each view has a date field with a imagebutton beside it. When you click the imagebutton is should open a modal popup. The modal popup holds a canledar control. When I bring up this page with the multiview I get the following error: "Assertion Failed: Could not find an HTML element with ID "ImageButton ....." for control of type "sys.UI.Image".

I understand why I get this error, and that's because the imagebutton control exists on the second view that is hidden (because it works on the first view if it's the only one defined to use modal popup) . So then I tried to move the ModalPopupExtender to be within the views. Then when I move to the second view I get "null or not null object" error in the WebResource.axd line 110. The actual statement is "$(_CancelControlID).detachEvent('onclick', _cancelHandler);". I really need to get this working ASAP. If I can make this work with just the Popup (not Modal Popup) that would also be OK, but I have to call the popup from the ImageButton....

As you note, different panels of a MultiView are in many ways like completely separate pages. I like your idea of moving the MPE into the same view as the target control. Does that layout work if you remove the MultiView entirely? If not, then maybe it's something else getting in the way.

No comments:

Post a Comment