tags:

views:

238

answers:

2

Hi,

i want to use datagrid in modalpopup.I have 2 problems.First when user clicks a button,modalpopup shows and then in modalpopup there is a button which lists some records.If user clicks this list button,modalpopup closes and also list button's code doesnt execute.Is it possible to create some postbacks events in asp.net ajax modalpopup control or can we do just 1 postback as okButton?(Like ConfirmBox).I wanna make a selection depends on criteria in modalpopup,can i do it?Whare are ur recommendations?

A: 

You can use IFrame and bit of JavaScript to achieve that.

IFrame can host another ASP.NET page which you can use for displaying the information on modal pop-up. This will not be a post back. Each time the IFrame is shown, it will load the modal pop-up information page.

Using JavaScript you can show/hide the `IFrame' and it can be made movable on the page also.

IFrame can be designed like a window by having a cross button.

Vijay
A: 

I did this recently, i ended up using jboxy in an iframe. Later i was told that an iframe was not an acceptable implementation. The result was a WCF service with boxy. The service would build the html and return it to the javascript ajax and display it on the page.

Currently in offtime i'm writing a control with similiar features just for easier implementations in the future. It's a pain.

The easiest way BY FAR, is to just use jboxy (modal popup) and pass it an html string with an iframe that links to your aspx page that displays the datagrid. 30 seconds to implement.

boxy: http://onehackoranother.com/projects/jquery/boxy/

Highstead