473,385 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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"
AutoGenerateColumns="FALSE">

<Columns>
<asp:TemplateColumn HeaderText="">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "ArtistName") %> -
<%# DataBinder.Eval(Container.DataItem, "DiscTitle") %>
</ItemTemplate>
</asp:TemplateColumn>

</Columns>
</asp:DataGrid>

Nov 19 '05 #1
3 5873
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.googlegr oups.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"
AutoGenerateColumns="FALSE">

<Columns>
<asp:TemplateColumn HeaderText="">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "ArtistName") %> -
<%# DataBinder.Eval(Container.DataItem, "DiscTitle") %>
</ItemTemplate>
</asp:TemplateColumn>

</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*********************@z14g2000cwz.googlegro ups.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
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...
2
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...
0
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...
1
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...
4
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...
2
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...
1
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...
3
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"...
7
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: ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.