Welcome Guest Search | Active Topics | Sign In | Register

Passing Data to Dialog Options
Joe Garro
Posted: Monday, October 8, 2007 11:08:09 AM
Rank: Member
Groups: Member

Joined: 9/12/2007
Posts: 20
Hello,

I have an asp.net gridview that loads transaction records. In each row I want to add a link button that gives the use the option to email some of the current rows data.

Would I be able to use the Dialog to popup the form for emailing? The part where I'm stuck is getting the values from the current row into the dialog form controls.

Can I open the dialog with parameters or something and load them into the form in the dialog?

Any help is appreciated.
Thanks
Joe
eo_support
Posted: Monday, October 8, 2007 4:55:25 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Joe,

Yes. You can open a dialog with parameters. In order to do that you will need to do it from client side by calling client side show method:

http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Dialog.show.html

There are two ways to handle the parameters. One way is to handle it before you call show; another way is to pass your parameters through the third parameter of the show method, then provides a ClientSideOnInitDialog handler to handle the parameters. Either way it will be totally up to you to actually handle the parameters. The dialog only helps you to pass it through. Also, if you use it this way, everything needs to be done with JavaScript.

If something must be done about the dialog on the server side, then you would need to use a CallbackPanel control. Put the dialog inside the CallbackPanel, then trigger the CallbackPanel with appropriated parameters. Inside the server side CallbackPanel_Execute handler, you can update the dialog accordingly and then set the dialog's InitState to "Visible", that way the dialog will display when the AJAX call returns. For details about how to use CallbackPanel, please refer to CallbackPanel documentations.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.