Solved

Data bind a nested listview (ASP.NET)

Posted on 2009-04-08
1
2,960 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
[X]
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
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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

756 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