Nesting Repeater or DataList w/in DataGrid

S

Sparky Arbuckle

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>
 
S

Sparky Arbuckle

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.
 
G

Grant Merwitz

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top