Hi all
In short, I have a dataset that contains 10 records and the relevant headings.
All I want to do is bind this dataset to a asp.net repeater control. All the
examples I've seen create table cell headings and then map to them headings
like:
<%#DataBinder.Eval(Container.DataItem, "CompanyName")%>,
<%#DataBinder.Eval(Container.DataItem, "ContactName")%></font>
I dont need to , and therefore haven't, created any headings as the dataset
has them already. I just want to do something like this:
CODE BEHIND CODE:
this.repwscDayTop10.DataSource = dsDayTop10;
this.repwscDayTop10.DataBind();
WEB FORM CODE:
<asp:Repeater id="repwscDayTop10" runat="server">
<%#Container.DataItem%>
</asp:Repeater>
How do I do this? Is there any good links? Thanks in advance.
Karl Seguin [MVP] - 15 Feb 2006 12:26 GMT
can you show us exactly what your dataset looks like? Are the "headings"
just another row in the dataset (the first? the last?) or are they the
actual column names? If it's the actual column names, just try using a
datagrid with no templates or anything:
<asp:datagrid id="x" runat="server" AutoGenerateColumns="true"/>
Karl

Signature
http://www.openmymind.net/
> Hi all
>
[quoted text clipped - 22 lines]
>
> How do I do this? Is there any good links? Thanks in advance.