Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - format datagrid

 
Thread Tools Search this Thread
Old 10-19-2004, 04:27 PM   #1
Default format datagrid


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=?=
  Reply With Quote
Old 10-19-2004, 04:47 PM   #2
Karl Seguin
 
Posts: n/a
Default Re: format datagrid
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:8B42145A-9197-410A-943F-...
> 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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why No One Wins in the High-Def Format War Ablang DVD Video 50 11-04-2007 04:19 AM
As growth slows, Hollywood faces a DVD standoff. Allan DVD Video 0 07-11-2005 02:10 PM
High Definition and the future of viewing. Allan DVD Video 3 03-09-2005 12:56 AM
Format Wars Redux: Blu-ray Disc vs. HD-DVD Ablang DVD Video 2 02-20-2005 08:06 AM
NYTimes: Next Video Format robert gray DVD Video 12 01-01-2004 10:42 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46