473,654 Members | 3,071 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datalist within a Datalist.

Hi All,

This may be a stupid question, and may not be the correct solution for my
problem, but here goes.

I want to include a datalist within a datalist, in order to effectively
group items according to one of the columns in a dataset. For example: I
have 2 artists and 7 items. I want to display these in the following
format:

Artist1 Item1
Item2
Item5
Item7

Artist2 Item3
Item4
Item6

I have successfully included a datalist inside a datalist, BUT the second
datalist lists ALL items. I need to somehow run a custom SELECT statement,
eg: in a dataview, but I can't figure out how to do this dynamically. I
want to avoid having a separate Dataview for each Artist.

Can anyone help me please? And is this the right solution?

Regards and Thanx in advance.

Rob
ro**@devtest.co m
Nov 15 '05 #1
2 7419
I'm not sure if I understand your question, but it sounds like you're
trying to duplicate the functionality provided in datagrids:
http://www.dotnetjunkies.com/tutoria...63C4C9BBC.dcik

Hope that helps,

Erik

"Rob Manger" <ro**@devtest.c om> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi All,

This may be a stupid question, and may not be the correct solution for my
problem, but here goes.

I want to include a datalist within a datalist, in order to effectively
group items according to one of the columns in a dataset. For example: I
have 2 artists and 7 items. I want to display these in the following
format:

Artist1 Item1
Item2
Item5
Item7

Artist2 Item3
Item4
Item6

I have successfully included a datalist inside a datalist, BUT the second
datalist lists ALL items. I need to somehow run a custom SELECT statement, eg: in a dataview, but I can't figure out how to do this dynamically. I
want to avoid having a separate Dataview for each Artist.

Can anyone help me please? And is this the right solution?

Regards and Thanx in advance.

Rob
ro**@devtest.co m

Nov 15 '05 #2
Erik,

Thanx heaps for the prompt reply. This looks like exactly what I want :D

Rob.

"Erik Frey" <er*******@hotm ail.com> wrote in message
news:uO******** ******@TK2MSFTN GP09.phx.gbl...
I'm not sure if I understand your question, but it sounds like you're
trying to duplicate the functionality provided in datagrids:
http://www.dotnetjunkies.com/tutoria...63C4C9BBC.dcik
Hope that helps,

Erik

"Rob Manger" <ro**@devtest.c om> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi All,

This may be a stupid question, and may not be the correct solution for my problem, but here goes.

I want to include a datalist within a datalist, in order to effectively
group items according to one of the columns in a dataset. For example: I have 2 artists and 7 items. I want to display these in the following
format:

Artist1 Item1
Item2
Item5
Item7

Artist2 Item3
Item4
Item6

I have successfully included a datalist inside a datalist, BUT the second datalist lists ALL items. I need to somehow run a custom SELECT

statement,
eg: in a dataview, but I can't figure out how to do this dynamically. I
want to avoid having a separate Dataview for each Artist.

Can anyone help me please? And is this the right solution?

Regards and Thanx in advance.

Rob
ro**@devtest.co m


Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1765
by: pete K | last post by:
Is it possible in asp.net to have a datalist in the itemtemplate of another datalist? For example: <asp:datalist id="MyList" runat="server"> <ItemTemplate> <table border="0" width="300"> <tr> <td><%# DataBinder.Eval(Container.DataItem, "title") %></td>
1
10927
by: bill yeager | last post by:
I have a datagrid control within a datalist control. When I try and do a "Find" on the control, the object comes back with nothing and then my pgm crashes. I am 100% sure that my datagird inside my datalist has an id of "Datagrid3". dgChild comes back with "Nothing" while debugging. Here is my code in the itemdatabound event for the datalist: <code>
1
3168
by: Doug | last post by:
The html below shows DataList "DiscountList" nested within DataList "EventItemList". DiscountList contains a Label control. I'm trying to find the label, using FindControl, during EventList_ItemCreated (below the html), but it's always <undefined value> (null). Everything else works fine. Eventually I need to set the value of the label depending up the Count of the DataView "dvDiscount". For now I'll settle for just finding the damn...
9
2574
by: jjack100 | last post by:
I want to set the text value of a label that is within a datalist in the codebehind. Does this have to be done in the databound event? Simplified example: <asp:DataList id="dlItem" runat="server"> <ItemTemplate> <asp:Label ID="lblItemPrice" runat="server" /> </ItemTemplate> </asp:DataList>
5
2043
by: Petr SIMUNEK | last post by:
Is there a way to render something before the DATALIST encapsulation table gets rendered ? So that I could have Label before actual table that is rendered by DATALIST... <h1>Some Label</h1> <TABLE ID='DataList' width='100%'> *** inside datalist objects rendered *** </TABLE> Thanx to all...
0
1697
by: s.gregory | last post by:
My page layout is like this: Page >DataList (databound using ObjectDataSource1 contained in page) >>Items >>>UserControl >>>>GridView (databound using another ObjectDataSource2 contained in UserControl) So I've basically got a GridView (wrapped in a UserControl), that is nested within a DataList. Representing a fairly simple relational data
0
3936
by: Isz | last post by:
PROBLEM: This problem is related to the postback and handling events correctly. BACKGROUND: I have a datalist which acts as a tabbes list with horizontal layout. This datalist is bound to a strogly typed collection I called TabCollection which is a collevtion of items called tab. Each tab is as follows:
2
2045
by: rn5a | last post by:
I am using a DataList control to display records from a database table. The records are being rendered in a HTML table which is within the DataList....something like this: <form runat="server"> <asp:DataList ID="dlItem" AlternatingItemStyle-BackColor="lavender" ItemStyle-BackColor="pink" runat="server"> <HeaderTemplate> <table width="100%">
0
1427
by: Jim in Arizona | last post by:
Is there an easier way to make a datalist aware of line breaks within text fields? I have a text box that users can type into. If they press the enter key a few times, VB sees this as a vbCrLf. This text is inserted into a text field in an SQL server. When the data is read and presented by the datalist, the line breaks are gone. All the text is just together without paragraphing. I am able to keep the spaces if I try this approach:
4
3980
by: Peter | last post by:
I have a DataList and each item in the datalist has an imge, I want to change the datalist item image on the client side when user clicks a button. How would I do that with JavaScript, does anyone has an example of how to change a DataList item with JavaScript? Thank You Peter
0
8380
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8710
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8497
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2721
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.