views:

574

answers:

4

I've got a modal popup (using ModalPopupExtender) working in a kind of master/detail view for a grid. When you click a button on one grid, it displays a popup window containing another grid of information, based on the row clicked in the first grid.

This works well... I've enabled editing in the grid that is popped up. When you click edit though, the popup window disappears. If I click the display button in the first grid though to bring the popup window visible again it displays, and is now in edit mode.

Is there a way to make postbacks in the popup not close the popup?

A: 

Figured out a way to do this...

In the row command event for the gridview I just called Popup() for my modalpopup.

Works :)

Adam
A: 

i have a similar problem - i have a gridview which i have called the modal popup inline (due to the referencing of a targetcontrolid being exceptionally hard from the page to the gridview), i am having trouble referencing the modal popup because of this.

Do you have any pointers as to which way i should go with this - i.e. with the modalpopup being called outside of the gridview(if so any ideas on referencing the targetcontrolid) or whether to keep it inline and indirectly reference the modalpopup.

this sounds uncannily similar to what i've done and as i'm only a beginner i'm really just looking for pointers on how is the best way to do it. if there's anything else i can tell you to make it easier for you to help then let me know and i'll try my best - i appreciate that the language used is probably quite crude when it comes to being in a forum used by developers.

thanks for any help you can offer.

Andy Brown
A: 

I usually put an UpdatePanel around my ModalPopup contents. That way, everything that happens in the popup can be updated without doing a full page reload. It also makes it so that clicking "back" in the browser doesn't page through each thing that you did in the popup.

StriplingWarrior
A: 

Thanks for the reply - although i can't seem to use gridviews within the update panel.

is there a reason for this or is it just not supposed to support them?

Andy Brown