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

Hello ST3VO, I am a little confused here while I read through all the posts.

I need to know what is your current problem and which problems you have fixed.

Please show the updated code.

If you can attach the source file, it will be great.

This is why I don't understand your question, given I don't read through all the other posts.

Here's what I infer,

your youtubevideo_mc.loadMovie("http://www.youtube.com/v/Rd-ZXOJDBsg&hl");

does not work because you either have no variable referenced as youtubevideo_mc or you have no instances named as youtubevideo_mc.

this usually refers to _root or the movie clip you are placing the code in. Assuming it's _root, you will get problems because you are overwriting the root with something else, thus removing all your other code.

If it's a movie clip, there shouldn't be any problems.

A restate of the question will be great. More details will be nice, like the instances you have on stage as well as any other code that is linked to the code you are using.

For example if youtubevideo_mc is actually a variable, it will be helpful if you show me the definition.
Random Solutions  
 
programming4us programming4us