473,804 Members | 3,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Nesting Repeater or DataList w/in DataGrid

I'm sure this question has been posted many times, but I have yet to
find an answer for it. I am trying to nest a repeater (or datalist)
inside of a datagrid and am trying to figure out how to nest
"sub-columns" inside of it. For example:
Column1

ArtistName - "DiscTitle"

Column2

TrackNumber. TrackName

Column1 Column2

AristName1 - "DiscTitle1 " 1. song 1
2. song 2
3. song 3

AristName2 - "DiscTitle2 " 1. song 1
2. song 2

etc....

I know I need to bind the data using ItemDataBound but have not found
any VB.NET examples to help get me started. Below is the code for my
DataGrid. I am also using Visual Studio .NET 2003 Professional
Edition.

<asp:DataGrid id = "DataGrid1"
runat="server"
AutoGenerateCol umns="FALSE">

<Columns>
<asp:TemplateCo lumn HeaderText="">
<ItemTemplate >
<%# DataBinder.Eval (Container.Data Item, "ArtistName ") %> -
<%# DataBinder.Eval (Container.Data Item, "DiscTitle" ) %>
</ItemTemplate>
</asp:TemplateCol umn>

</Columns>
</asp:DataGrid>

Nov 19 '05 #1
3 5887
here's a Thread i found that may be of assistance
http://www.daniweb.com/techtalkforums/thread5777.html

hope that helps

Remember, google is your friend and will offer you all the examples you
want, if you know how to find them :)

"Sparky Arbuckle" <tw*@secureroot .com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
I'm sure this question has been posted many times, but I have yet to
find an answer for it. I am trying to nest a repeater (or datalist)
inside of a datagrid and am trying to figure out how to nest
"sub-columns" inside of it. For example:
Column1

ArtistName - "DiscTitle"

Column2

TrackNumber. TrackName

Column1 Column2

AristName1 - "DiscTitle1 " 1. song 1
2. song 2
3. song 3

AristName2 - "DiscTitle2 " 1. song 1
2. song 2

etc....

I know I need to bind the data using ItemDataBound but have not found
any VB.NET examples to help get me started. Below is the code for my
DataGrid. I am also using Visual Studio .NET 2003 Professional
Edition.

<asp:DataGrid id = "DataGrid1"
runat="server"
AutoGenerateCol umns="FALSE">

<Columns>
<asp:TemplateCo lumn HeaderText="">
<ItemTemplate >
<%# DataBinder.Eval (Container.Data Item, "ArtistName ") %> -
<%# DataBinder.Eval (Container.Data Item, "DiscTitle" ) %>
</ItemTemplate>
</asp:TemplateCol umn>

</Columns>
</asp:DataGrid>

Nov 19 '05 #2
Thanks Grant. I was able to figure out nesting the datagrid inside
another datagrid. Now I need to know if it is possible to nest a
datagrid inside of a nested datagrid.

Nov 19 '05 #3
It should basicly consist of repeating the same process.

I gather you are binding your grid through the ItemDataBound Command.
Well,. when you do that, set the new grids ItemDataBound command to a method
you have created.
And in that method do the same thing

HTH

"Sparky Arbuckle" <tw*@secureroot .com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
Thanks Grant. I was able to figure out nesting the datagrid inside
another datagrid. Now I need to know if it is possible to nest a
datagrid inside of a nested datagrid.

Nov 19 '05 #4

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

Similar topics

3
2407
by: Fredrik Rodin | last post by:
All, I'm looking for a way of generating a grouping in a repeater (or other control). Instaed of describing everything here, just look at this link and you can see how I did it in classic asp 3.0 including source code and SQL-script (SQL Server 2000). http://www.rodin.se/gruppering.asp You'll see the result with grouped products. Is there a way of doing the
2
7064
by: Simon Harris | last post by:
Hi All, I have an app which requires a list of coutries to be displayed, so far I have a datagrid which contains displays the countries Ok, along with flag images, these are also links to my dtail page - So far so good (Thanks to Pete Beech for the assistance in getting this far!) What I would now like is to spread the countries across multiple columns - e.g. grid/table with 20 countries, 5 rows X 5 columns. (Currently they are...
0
1176
by: Shun Duke | last post by:
I have working code allowing me to nest repeaters inside datalists using relations and child rows but this does not allow me to acheive my goal. What I want to be able to do is display small tables (approx 5-10 rows by 3-4 columns) of data using repeaters nested in a datalist. Each row in the datalist source will act as a pointer and filter to the child table for the repeater source.
1
1557
by: JD | last post by:
Hello Everyone, I am trying to do a page where when the user gets to the page it will look very similar to the following: <table border=1> <tr> <td bgcolor="green" colspan="2">Main Header</td> </tr> <tr><td bgcolor="gray">SubHead1</td><td bgcolor="gray">Subhead2 -
4
5296
by: darrel | last post by:
I have a repeater that I'd like to apply some logic to, namly highlighting the top few items in the repeater. To do this, I need to determine the record count. I've tried this: <% dim highlightCount as integer = 1 %>
2
1197
by: serge calderara | last post by:
Dear all, I have make some basic testing on Repeater and DataList object. I have notice for sure that if your database retrive data contains 3 records, then both controls will repeat the predifined template to display those 3 records. As a first view I would say that Datalist or Repeater are not so suitable as Datagrid to display a well formed data row...
1
1431
by: Hans Merkl | last post by:
Hi, I must be missing something here. In a DataList and DataGrid I can use the property DataKeys to identify the selected element and get to its values. But I can't find a way to do the same in a Repeater. Can anybody give me an idea how to this in a Repeater or point me to some sample code? Thanks
3
1426
by: GD | last post by:
I'm using a DataList and a Repeater (nested in the DataList) to display a list of "Chapters" and "Documents" within the Chapters. <asp:DataList ID="dlChapter" Runat="server" RepeatColumns="2" RepeatDirection="Vertical" OnItemDataBound="dlChapter_OnItemDataBound"> <ItemTemplate> <table> <tr> <td colspan="2"><%# DataBinder.Eval(Container.DataItem, "ChapterName")%></td>
7
2080
by: Doug Parker | last post by:
I'm trying to use the repeater control to create a column-like row of data, I've searched the net and it doesn't appear to be that easy. Use this page for reference: http://www.westmarkadvisors.com/photo_gallery.php (i'm converting this to .net) I'm using the repeater to list all of the thumnails below, but i don't know how to insert a </tr><tr> break in the code. AlternatingItemTemplate seems to affect every other row, and as you can
0
9707
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
9585
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10586
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
10338
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...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5525
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
5658
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.