Question : get data from a gridview to a popup window and then update the gridview

I have a gridview.

Now i need to create a link on the gridview to say "update" which then opens a popup window for that row of data , I then update the data in the popup and click update (in the popup) window, this updates data, closes the popup and refreshes the gridview.

how do I do it?

Answer : get data from a gridview to a popup window and then update the gridview

Hi try this..


How it works??
Create A button add atribute to open popup to the button inside gridview.
U must ve a seperate page for the updation
In that updation page include my js fn i mentioned below to close popup(function name:closepopup()) by similarly adding attribute


in ur_updatepage.aspx ..
'Do the usual update process
cmd.ExecuteNonquery()
'After this line
update_button.Attributes.Add("onclick", "return closepopup();") 'To close the popup


Lemme no further details To assist u....

Hope this helps :)

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
'Page Name is test.aspx


    Untitled Page
     


    
    
Protected Sub gv_popup_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then Dim update As Button = TryCast(e.Row.FindControl("popup"), Button) update.Attributes.Add("onclick", "return mypopup('" & e.Row.Cells(0).Text & "');") End If End Sub //ur_updatepage.aspx .. Untitled Page
Random Solutions  
 
programming4us programming4us