Solved

Data bind a nested listview (ASP.NET)

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

910 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

24 Experts available now in Live!

Get 1:1 Help Now