we use two listview as <asp:ListView id="lv1"> <itemtemplate> <asp:ListView id="lv2">...</asp:ListView> </item template> </asp:ListView> My problem ,how bind the both listview as given example please give sample of this example
Now, write code for DataSource of lv1 in Page_Load event and for lv2 in ItemDataBound of lv1. But remember to find lv2 in lv1 in order to point to lv2.
Here is the code for finding lv2.
ListView lv2 = e.Item.FindControl("lv2") as ListView;
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Hello Yash,
You can accomplish this task by initializing the DataSource of your second ListView.
Here is the code for .aspx file
Now, write code for DataSource of lv1 in Page_Load event and for lv2 in ItemDataBound of lv1. But remember to find lv2 in lv1 in order to point to lv2.
Here is the code for finding lv2.
Now you can use DataBound Property of lv2;
For further details refer to this forum post:
http://www.mindstick.com/Forum/45/ItemCommand%20Event%20in%20Nested%20Repeater%20and%20listview
Hope this will help you.