Edit a gridview inside a modalpopup without closing popup

烈酒焚心 提交于 2019-12-11 01:50:05

问题


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?


回答1:


Figured out a way to do this...

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

Works :)




回答2:


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.



来源:https://stackoverflow.com/questions/2380736/edit-a-gridview-inside-a-modalpopup-without-closing-popup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!