Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Another Repeater question

Reply
Thread Tools

Another Repeater question

 
 
Peter Kirk
Guest
Posts: n/a
 
      10-06-2005
Hi

I generate an array of Port objects, and "bind" them to a repeater, called
PortList, like this:

PortList.DataSource = ports;
PortList.DataBind();

I can then use this in my asp, like this (pseudo asp):

<asp:repeater id="PortList" Runat="server">
<ItemTemplate>
<%# ((IPort)Container.DataItem).Name %><br>
<%# ((IPort)Container.DataItem).ArrivalDate %><br>
</ItemTemplate>
</asp:repeater>

But, one of the properties of my Port object is itself an array - of
"comments" (strings). How do I get my PortList repeater to also display the
array of comments for each Port?

Something like:

<asp:repeater id="PortList" Runat="server">
<ItemTemplate>
<%# ((IPort)Container.DataItem).Name %><br>
<%# ((IPort)Container.DataItem).ArrivalDate %><br>

<!-- Comments is an array of strings, each of which need to be
displayed. -->
<%# ((IPort)Container.DataItem).Comments %><br>

</ItemTemplate>
</asp:repeater>


Thanks for any help,
Peter


 
Reply With Quote
 
 
 
 
Peter Kirk
Guest
Posts: n/a
 
      10-06-2005

"Peter Kirk" <(E-Mail Removed)> skrev i en meddelelse
news:(E-Mail Removed)...
> Hi


> But, one of the properties of my Port object is itself an array - of
> "comments" (strings). How do I get my PortList repeater to also display
> the array of comments for each Port?
>


Hi again - I found out I can define another "nested" repeater directly on my
asp. (One reason I wasn't seeing anything when I tried this before was that
there wa sno data in my database!)

Peter


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
repeater inside a repeater problem. uncensored ASP .Net 0 10-25-2006 06:10 PM
Repeater inside a Repeater Microsoft ASP .Net Web Controls 0 08-21-2006 09:13 AM
Repeater inside a repeater....how? voidfill3d@yahoo.com ASP .Net 1 08-10-2005 01:58 PM
Repeater Using Javascript Referencing a Column in the Repeater rwoo_98@yahoo.com ASP .Net 0 02-26-2005 05:02 PM
Repeater control with nested repeater chris.reed@digus.com ASP .Net 0 02-11-2005 05:10 PM



Advertisments