nested gridview get parent row

后端 未结 5 1826
执笔经年
执笔经年 2021-01-20 22:04

I am using Nested GridViews where each row in the gridview has child gridView. I am using RowDataBound Event of Parent GridView, to Bindin

5条回答
  •  礼貌的吻别
    2021-01-20 22:39

    I don't think you will be able to track it normally, but I would embed ID field into the hidden field and put this hidden field under TemplateField,

     
             
                           
                                  
                                                         
                             
                    
      
    

    this way you can get its value by going

    gvChild.Parent.FindControl("idOfYourHiddenField");
    

提交回复
热议问题