Edit a gridview inside a modalpopup without closin

2019-07-16 23:29发布

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?

2条回答
时光不老,我们不散
2楼-- · 2019-07-17 00:04

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.

查看更多
贼婆χ
3楼-- · 2019-07-17 00:07

Figured out a way to do this...

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

Works :)

查看更多
登录 后发表回答