Referencing nested control

后端 未结 3 719
离开以前
离开以前 2020-12-21 21:18

I have two gridviews - one nested in the other - and I am trying to set the datasource of the child grid programmaticly, but am not sure how to reference it.



        
3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-21 21:31

    object dataKeyValue = ((source as RadGrid).NamingContainer as DataItem).GetDataKeyValue("ID"); 
    

    //use the dataKeyValue to fetch the correct Employee object

提交回复
热议问题