Question : Access control inside nested gridview

Hello experts,

I have a gridview nested within a gridview.


   


Within Gridview 2 I have a linkbutton which has an event and on that event I would like to get access to it's parents gridview key value.

So for instance this usually works if the gridview is not nested like attached (below).

So I think what is needed is to get the row's parent (which is gridview2) and go from there. So my question is how can I get access to gridview2 using the code below?

Thanks

Code Snippet:
1:
2:
3:
4:
5:
6:
7:
protected void LinkButton1_Click(object sender, EventArgs e)
    {
        LinkButton lb1 = (LinkButton)sender;
        GridViewRow row = (GridViewRow)lb1.NamingContainer;
        
        long intOrderItemId = Convert.ToInt64(GridView2.DataKeys[row.RowIndex].Value);
    }

Answer : Access control inside nested gridview

Updated script...
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
Option Explicit

Dim RegLocate, objShell, sUser

Set objShell = WScript.CreateObject("WScript.Shell")

RegLocate = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\AppData"

sUser=objShell.ExpandEnvironmentStrings("%UserName%")

objShell.RegWrite RegLocate,"\\server2\" & sUser & "$\Application Data","REG_SZ"

RegLocate = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\AppData"

objShell.RegWrite RegLocate,"\\server2\" & sUser & "$\Application Data","REG_SZ"
Random Solutions  
 
programming4us programming4us