Datalist HeaderTemplate repeating duplicates? - sort, break, grouping?

J

jobs at webdos

I have data that looks like this

prodid fileid date where prodid repeats

I want report like this

prodid -
fileid
date

fileid
date

fileid
date

My Datalist is below, and ofcoure the header shows up as unbound.
Anybody have an example of how I can do this with a web control.

I suspect the ansswre might be in datarepeater, but not sure how to
bind from that

Also , was wondering, If I have a datasource that returns a single row
with a single conlumn, is there any way to bind it to a single label
like : ProcessIdLabel


<asp:DataList ID="DataList1" runat="server" DataKeyField="ProcessId"
DataSourceID="SqlDataSource1">
<ItemTemplate>
FileName:
<asp:Label ID="FileNameLabel" runat="server"
Text='<%# Eval("FileName") %>'></asp:Label><br />
FileDate:
<asp:Label ID="FileDateLabel" runat="server"
Text='<%# Eval("FileDate") %>'></asp:Label><br />
FileRecords:
<asp:Label ID="FileRecordsLabel" runat="server"
Text='<%# Eval("FileRecords") %>'></asp:Label><br />
<br />
</ItemTemplate>
<HeaderTemplate>
<br />
ProcessId:
<asp:Label ID="ProcessIdLabel" runat="server"
Text='<%# Eval("ProcessId") %>'></asp:Label><br />
</HeaderTemplate>
</asp:DataList>
 

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

Top