Solved

Data bind a nested listview (ASP.NET)

Posted on 2009-04-08
1
2,963 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.

732 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