views:

39

answers:

1

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 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: 

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.

Ismail