Welcome to Dream.In.Code
Become an Expert!

Join 150,185 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,094 people online right now. Registration is fast and FREE... Join Now!




popup

 
Reply to this topicStart new topic

popup, closing popup

Rating  4
seko
8 Nov, 2007 - 05:08 AM
Post #1

New D.I.C Head
*

Joined: 8 Nov, 2007
Posts: 14


My Contributions
hi I have a popup and there is a gridview in it. I want to close popup after selecting gridview by clicking select button. I can do this with a button but ı want to this in the gridview selectedindexchange event.Good Working

Protected Sub Gridview1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Dim script1 As String = "<script>self.close();window.opener.location.reload(true);</script>"
RegisterClientScriptBlock("test", script1)
End Sub

This post has been edited by seko: 8 Nov, 2007 - 05:24 AM
User is offlineProfile CardPM
+Quote Post

girasquid
RE: Popup
8 Nov, 2007 - 07:13 AM
Post #2

Barbarbar
Group Icon

Joined: 3 Oct, 2006
Posts: 1,295



Thanked: 18 times
Dream Kudos: 725
My Contributions
Have you tried adding the AutoPostBack property to your Gridview? It sounds like that might be what you're looking for.
User is offlineProfile CardPM
+Quote Post

seko
RE: Popup
8 Nov, 2007 - 07:33 AM
Post #3

New D.I.C Head
*

Joined: 8 Nov, 2007
Posts: 14


My Contributions
thank you for your relation.

5 minutes ago ı realize that the button is outside the updatepanel but gridview is in the updatepanel.
So ı put out the gridview from the updatepanel and it has worked.

Maybe you can help me what can ı do unless putting out the gridview outside the updatpanel.

User is offlineProfile CardPM
+Quote Post

girasquid
RE: Popup
8 Nov, 2007 - 08:00 AM
Post #4

Barbarbar
Group Icon

Joined: 3 Oct, 2006
Posts: 1,295



Thanked: 18 times
Dream Kudos: 725
My Contributions
If you set AutoPostBack on your gridview, even if it's not inside an UpdatePanel it will automatically post back when the selected index changes - you'll just get a page refresh.
User is offlineProfile CardPM
+Quote Post

seko
RE: Popup
8 Nov, 2007 - 08:12 AM
Post #5

New D.I.C Head
*

Joined: 8 Nov, 2007
Posts: 14


My Contributions
how can ı set AutoPostBack ?
User is offlineProfile CardPM
+Quote Post

girasquid
RE: Popup
8 Nov, 2007 - 08:50 AM
Post #6

Barbarbar
Group Icon

Joined: 3 Oct, 2006
Posts: 1,295



Thanked: 18 times
Dream Kudos: 725
My Contributions
You can normally set it on your elements that you add to a page - but I just discovered that you can't set it on a GridView element. Try having the select button you mentioned use a Click event to handle your code for you.

This post has been edited by girasquid: 8 Nov, 2007 - 08:52 AM
User is offlineProfile CardPM
+Quote Post

seko
RE: Popup
8 Nov, 2007 - 12:27 PM
Post #7

New D.I.C Head
*

Joined: 8 Nov, 2007
Posts: 14


My Contributions
tanks girasquid it is working unless updatepanel.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 04:04AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month