473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

format datagrid

sp
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
Nov 18 '05 #1
1 920
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" <sp@discussions.microsoft.com> wrote in message
news:8B**********************************@microsof t.com...
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

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tamlin | last post by:
Hi all, I'm getting a bug with the datagrid object. I've created one from scratch, bound it to a dataview with 2 int32 columns and formatted the output as currency. I've found that when you...
1
by: J.B | last post by:
I have a datagrid that will display different datasets, (it runs different sprocs based on a value in the querystring) but it will always return 6 columns. The 5th and 6th columns are always Date...
6
by: Hutty | last post by:
I've looked around and have yet to find anything that would answer my question regarding formating a column in a datagrid. My grid looks like this as far as data" AMHQCON|51300.01|-3147 The...
1
by: Julius Fenata | last post by:
Dear all, I need help to change my item-template value format... Here is my case, I have a datagrid, with 'SubjectPrice' field, and when the grid displayed, my 'SubjectPrice' field displayed...
2
by: DraguVaso | last post by:
Hi, I'm looking for a nice way to format the cell of my datagrid according to some predefined 'rules'. I found a lot on the site of George shepherd, but it wasn't really what I was looking for:...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.