format datagrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello everbody,
I need to display my data like this using asp.net and vb.net
Journals issues MailDate
ActualDate
AAA 1 01/15/04
01/15/04
2 01/16/04
01/16/04
3 01/17/04
01/15/04

BBB 1 01/15/04
01/15/04
2 01/16/04
01/16/04
3 01/17/04
01/15/04

can somebody post suggestions how to proceed with this.

Thanks in advance

regards,
sp
 
Well, you haven't given us much information about how your data is
organized. My guess is you have a dataset with 2 datatables.

One datatable has a JournalId, JournalName, Issues and MailDate column and
looks like:
1 AAA 1 01/15/04
2 BBB 1 01/15/04

The other table has an ActualDate, Issue, MailDate and JournalId column;

01/16/04 2 01/16/04 1
01/15/04 3 01/17/04 1
01/16/04 2 01/16/04 2
01/15/04 3 01/17/04 2


You would set up a DataRelationship between your first table's JournalId and
your 2nd tables JournalId.

You can then use a nested repeater to cleanly bind the two:

<asp:repeater id="journals" runat="Server">
<headerTemplate>//SET UP TABLE</headerTemplate>
<itemTemplate>
<tr>
<td><#% DataBinder.Eval(Container.DataItem, "Journal") %></td>
<td> </td>
<td><#% DataBinder.Eval(Container.DataItem, "Issues") %></td>
<td><#% DataBinder.Eval(Container.DataItem, "MailDate") %></td>
</tr>
<asp:repeater id="subItems" runat="server DataSource='<%#
((DataRowView)Container.DataItem).CreateChildView("relationshipName")%>'>
<tr>
<td> </td>
<td><#% DataBinder.Eval(Container.DataItem, "ActualDate") %></td>
<td><#% DataBinder.Eval(Container.DataItem, "Issues") %></td>
<td><#% DataBinder.Eval(Container.DataItem, "MailDate") %></td>
</tr>
<asp:repeater>
</itemtemplate>
</asp:repeater>


Something like that..
 

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

Similar Threads

Conditional Formatting 1
Total 3
Help w/Duplicates & Macros 5
Return Time for Duplicate Files & Times 4
Excel Jululian 5
Date Function 2
counting items within a date range 1
Counting items within a date range 1

Back
Top