开发者

Nested ListViews in ASP.NET [duplicate]

This question already has answers here: nested dictionary to nested repeater asp.net c# (3 answers) Closed 7 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜