Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Data bind a nested listview (ASP.NET)

Posted on 2009-04-08
1
2,938 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
ID: 24107181
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

790 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