Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   Another Repeater question (http://www.velocityreviews.com/forums/t776965-another-repeater-question.html)

Peter Kirk 10-06-2005 01:43 PM

Another Repeater question
 
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



Peter Kirk 10-06-2005 02:04 PM

Re: Another Repeater question
 

"Peter Kirk" <pk@alpha-solutions.dk> skrev i en meddelelse
news:uNWr3tnyFHA.1168@TK2MSFTNGP15.phx.gbl...
> 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




All times are GMT. The time now is 08:38 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.