Nested ListViews in ASP.NET [duplicate]
I am nesting 3 listviews. I use the itemdatabound event to find my second listview to bind to.
My question is how do I find the third listview. How do I access the itemdatabound of the second listview to then find the third co开发者_开发知识库ntrol.
Hope that makes sense
Thanks
EDIT: Can someone point me to a good example or tutorial on how to do this?
The easiest way to do this is to place your nested ListViews in user controls so the first listview contains user control which is built from a list view that contains a second user control that in turn contains a listview.
The disadvantage of this is that your code is then spread over 3 elements rather than just one, there are also some interesting challenges in getting the right information in the right places (communicating up and down the nested tree) - but it does allow you to deal with the event issues in a fairly straightforward manner.
精彩评论