Accessing parent data in nested repeater, in the HeaderTemplate

后端 未结 5 1187
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-30 02:42

Simple question, not sure there\'s a simple answer!

So here\'s the code: (I\'ve simplified it a lot to make it easier to read)



        
5条回答
  •  情话喂你
    2020-11-30 03:22

    I have found the answer actually:

    Use:

    
        <%# ((RepeaterItem)Container.Parent.Parent).DataItem %>
    
    

提交回复
热议问题