Help with AJAX ModalPopupExtender [Resolved]

Posted by Bugwee under Regular Expressions on 6/1/2011 | Points: 10 | Views : 3125 | Status : [Member] | Replies : 6
Hi,

I have a data entry fields wherein there is a button which open a modal popup extender. Let us say, if the user want to search/select Jobtitle then the modal popup extender will show.
On my modal popup extender i placed a usercontrol which has a gridview that contains the different jobtitles. Now my problem is, how could i hide or close the modal popup after selecting jobtitle or after a gridview row selected?

Thanks and Regards,
Bugwee




Responses

Posted by: Ndebata on: 6/1/2011 [Member] Starter | Points: 50

Up
0
Down

Resolved
Hi
Please find the attached sample.
Thanks,
Debata

 Download source file

Bugwee, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ndebata on: 6/1/2011 [Member] Starter | Points: 25

Up
0
Down
Hi
You can call .Show()/.Hide() method of modal pop up extender control to do so as per you need.

Thanks,
Debata

Bugwee, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bugwee on: 6/1/2011 [Member] Starter | Points: 25

Up
0
Down
hi,

Since the gridview is placed inside the usercontrol, i put this one in either RowCommand or SelectedIndexChanged of the gridview of the usercontrol but still nothing happens.
Response.Write("<script type='text/javascript'>parent.$find('ModalPopupExtender1').hide();</script>")


Is this right what i am doing?

Thanks,
Bugwee

Bugwee, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ndebata on: 6/1/2011 [Member] Starter | Points: 25

Up
0
Down
Hi

Try to call the Show() or Hide() from server side.

if your gridview is in a usercontrol then try to use delegate for this.

Thanks,
Debata

Bugwee, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bugwee on: 6/1/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

i never tried to use delegate for this. :( could you give me a sample code snippet?
my problem is inversely proportional with this
http://www.dotnetfunda.com/forums/thread4856-help-on-popup-window.aspx
i want to display a gridview on my modal popup and bring the selected data to the entry fields.

Thanks,
Bugwee



Bugwee, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bugwee on: 6/1/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

This is what i want. It works great..

Thanks a lot,
Bugwee

Bugwee, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response