473,394 Members | 1,641 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,394 software developers and data experts.

Formatting Parent-Child data in table

Kinda new to .NET. I used to build output like this manually in ASP and I
can't find any examples of creating this with Repeater, DataList, DataGrid
etc to make it any cleaner in .NET

select a.au_lname, a.au_fname, t.title, t.price, t.pubdate
from authors a
inner join titleauthor ta
on a.au_id = ta.au_id
inner join titles t
on t.title_id = ta.title_id
where au_lname between 'M' AND 'P'

I want my output grid to be:

<tr><td colspan=3>au_lname, a.au_fname</td><tr>
<tr><td>t.title</td><td> t.price</td><td> t.pubdate</td></tr>
etc.

Using data from above query(This may not look right but I hope it conveys
the idea):

MacFeather, Stearns
Cooking with Computers: Surreptitious Balance Sheets 11.95 06/06/1991
Computer Phobic AND Non-Phobic Individuals: Behavior Variations 21.59
10/21/1991
O'Leary, Michael
Cooking with Computers: Surreptitious Balance Sheets 11.95 06/06/1991
Sushi, Anyone? 14.99 06/12/1991
Author3
Title Price PubDate
Title Price PubDate
Title Price PubDate
Author4
Title Price PubDate
etc
Nov 19 '05 #1
1 955
Hi Chris,

If you're looking for a hierarchical grid, a great starting place is Denis
Bauer's free control:

http://www.denisbauer.com/ASPNETCont...ierarGrid.aspx

Ken

"Chris White" <chrisjwhite@@@mindspring...com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Kinda new to .NET. I used to build output like this manually in ASP and I
can't find any examples of creating this with Repeater, DataList, DataGrid
etc to make it any cleaner in .NET

select a.au_lname, a.au_fname, t.title, t.price, t.pubdate
from authors a
inner join titleauthor ta
on a.au_id = ta.au_id
inner join titles t
on t.title_id = ta.title_id
where au_lname between 'M' AND 'P'

I want my output grid to be:

<tr><td colspan=3>au_lname, a.au_fname</td><tr>
<tr><td>t.title</td><td> t.price</td><td> t.pubdate</td></tr>
etc.

Using data from above query(This may not look right but I hope it conveys
the idea):

MacFeather, Stearns
Cooking with Computers: Surreptitious Balance Sheets 11.95
06/06/1991
Computer Phobic AND Non-Phobic Individuals: Behavior Variations 21.59
10/21/1991
O'Leary, Michael
Cooking with Computers: Surreptitious Balance Sheets 11.95
06/06/1991
Sushi, Anyone? 14.99 06/12/1991
Author3
Title Price PubDate
Title Price PubDate
Title Price PubDate
Author4
Title Price PubDate
etc


Nov 19 '05 #2

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

Similar topics

10
by: Pascal | last post by:
Hello, I've a float number 123456789.01 and, I'de like to format it like this "123 456 789.01". Is this possible with % character?
13
by: Peter Diedrich | last post by:
My apologies, Spartanicus, but your layout does not work out at all. Any other suggestions how I can achieve this layout? <div> xxxxxxxxxx x x x IMG x x x x x
5
by: cnu | last post by:
Hi, I have to make a formatted (indented) xml file like this : <?xml version="1.0"?> <Message> <Parent index="0" length="6">123 <Child1 index="0,1" length="6">abcd</Child1> <Child2...
4
by: Bradley | last post by:
I have an A2000 database in which I have a continuous form with a tick box. There is also a text box with a conditional format that is based on the expression , if it's true then change the...
1
by: GGerard | last post by:
Hello Is there a way to use a variable in the Conditional Formatting of a Textbox? Example : I want the background of a textbox in a continuous form to change color when the value of...
1
by: Chuck Bowling | last post by:
Up front, i'm not very good with serialization and i'm not quite sure what capabilities it has. I have an app that outputs a text file with this format: <root> \t <node1> \t\t text... \t...
8
by: gopal | last post by:
Hi I am trying to write to log file but the formatting of string is not properly aligned in log file result The results looks some thing like this OK move.xml Successful OK ...
8
by: Typehigh | last post by:
I have many text fields with conditional formatting applied, specifically when the condition is "Field Has Focus". Without any events associated with the fields the conditional formatting works...
4
by: midlothian | last post by:
Hello, I have conditional formatting set up on a subform based on a calculated value in the underlying query. For instance, if Sales are >$1000, the query displays "Yes," otherwise it displays...
7
by: Andy_Khosravi | last post by:
I use the formatting trick in A97 to simulate conditional formatting in continuous forms. It has, up to this point, worked fine. Today I was making some design changes to the parent form (the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.