B
Brent
My SQL might generate a result like this:
Security 2005-06-30 2005-03-31 2004-12-31
IBM $65 $100 $123
(etc)
or like this:
Security 2005-06-30 2005-03-31
IBM $65 $100
(etc)
In other words, I don't know the number of columns until runtime. This
presents a problem in my repeater logic.
In the past I might do something like this:
==========================
<asp:Repeater id="dl" runat="server" EnableViewState="false">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Security")
<%# DataBinder.Eval(Container.DataItem, "2005-06-30") %>
<%# DataBinder.Eval(Container.DataItem, "2005-03-31") %>
<%# DataBinder.Eval(Container.DataItem, "2005-12-31") %>
</ItemTemplate>
</asp:Repeater>
==========================
This repeater will fail, however, if I have more or fewer date columns
than indicated.
So, the question is: how do I specify the number of columns at runtime?
Can I do a loop inside my repeater somehow?
I'd sure appreciate any help!
--Brent
Security 2005-06-30 2005-03-31 2004-12-31
IBM $65 $100 $123
(etc)
or like this:
Security 2005-06-30 2005-03-31
IBM $65 $100
(etc)
In other words, I don't know the number of columns until runtime. This
presents a problem in my repeater logic.
In the past I might do something like this:
==========================
<asp:Repeater id="dl" runat="server" EnableViewState="false">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Security")
<%# DataBinder.Eval(Container.DataItem, "2005-06-30") %>
<%# DataBinder.Eval(Container.DataItem, "2005-03-31") %>
<%# DataBinder.Eval(Container.DataItem, "2005-12-31") %>
</ItemTemplate>
</asp:Repeater>
==========================
This repeater will fail, however, if I have more or fewer date columns
than indicated.
So, the question is: how do I specify the number of columns at runtime?
Can I do a loop inside my repeater somehow?
I'd sure appreciate any help!
--Brent