format datagrid

Discussion in 'ASP .Net' started by =?Utf-8?B?c3A=?=, Oct 19, 2004.

  1. 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
     
    =?Utf-8?B?c3A=?=, Oct 19, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?c3A=?=

    Karl Seguin Guest

    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..
    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "sp" <> wrote in message
    news:...
    > 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
     
    Karl Seguin, Oct 19, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Candy
    Replies:
    2
    Views:
    1,202
    Janaka
    Feb 18, 2004
  2. Andy
    Replies:
    7
    Views:
    6,326
    Roedy Green
    May 10, 2004
  3. shannon
    Replies:
    1
    Views:
    8,647
  4. shannon
    Replies:
    0
    Views:
    590
    shannon
    Feb 1, 2006
  5. Replies:
    6
    Views:
    480
    Thomas Ganss
    Jan 15, 2006
Loading...

Share This Page