开发者

Avoid postback on gridview event

开发者 https://www.devze.com 2023-01-02 15:21 出处:网络
1 I\'ve gotpopup (using javascript) working in a kind of gridview. When you click a button on one grid, it displays a popup window containing another grid of information, based on the row clicked in

1

I've got popup (using javascript) working in a kind of gridview. 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 w开发者_开发问答orks 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?


Hidden variable is way to go.

<input id="popupState" type="hidden" value="1"  runat="server"/>

Set it from javascript and make the popup visible or invisible based on hidden variable's value in

jQuery(document).ready(function($) {
  // your code goes here.
});

if you are using jQuery or if you are using Microsoft Ajax controls i.e script manager etc.

function pageLoad(sender, e)
{
 //your code goes here
}

both of the javascript methods fires once the page is loaded on client. Better if you use jQuery one.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号