Solved

Data bind a nested listview (ASP.NET)

Posted on 2009-04-08
1
2,878 Views
Last Modified: 2013-12-17
I am making an asp.net page that has a listview that shows entities and this listview has a nested listview that shows items under that entity (entities can have 1 to n items assigned to them).  I have an ado dataset to populate these listviews, which contains two data tables one with the entities and one with the items (you know which items go to each entity because the items have an entity id).  I am trying to find a way to bind to this dataset instead of manually iterating through the dataset and adding items to the listviews.  Is there a way to do this?

I have been reading about master/detail datasets which sound like exactly what i have, I just am not sure how to apply them to this situation.
0
Comment
Question by:dave4dl
1 Comment
 
LVL 10

Accepted Solution

by:
Chad Smith earned 500 total points
Comment Utility
You need to handle the ItemDataBound event handler, and bind the inner ListView in that event handler.

More information on the event handler can be found here http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listview.itemdatabound.aspx
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now