Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > format datagrid

Reply
Thread Tools

format datagrid

 
 
=?Utf-8?B?c3A=?=
Guest
Posts: n/a
 
      10-19-2004
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
 
Reply With Quote
 
 
 
 
Karl Seguin
Guest
Posts: n/a
 
      10-19-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I save the style of a datagrid so that it appears on the automatic format to use iin another datagrid? Luis Esteban Valencia ASP .Net Datagrid Control 1 11-25-2004 08:05 AM
need code to convert float format to internal java float format which is kept in 4 bytes integer Andy Java 7 05-10-2004 09:26 PM
NTFS quick format and normal format Guan Foo Wah MCSE 2 05-08-2004 11:35 PM
Date Format - best way of converting a string into a date format Brian Candy ASP .Net 2 02-18-2004 02:13 PM
To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible? Andreas Klemt ASP .Net Datagrid Control 0 10-08-2003 01:19 AM



Advertisments