Ragged Display - Which Control?

M

Mike Robbins

I need to output information in the following format. I do not need
in-place editing.

Personnel

Room Bed Cap Name Company Bed Cap Name
Company
1 LL W Smith, Joe Acme LR E
Jones, Joe Apex
UL W Green, Sam Acme UR E
2 LL W LR
E
UL W
3 LL W Brown, Jill Western LR E
UL W Doe, Jane Hill


A few notes:

1. Deriving the data is no problem. I already have that.
2. There needs to be a line between each room.
3. Each room number is only displayed once although the room number is a
part of each record in the
dataset.
4. Each room does not have an even number of beds.
5. I do not need in-place editing. Each bed would be a hyperlink.
6. There may be more beds in a room. This is just an example.

My questions:

1. What control would work best? I originally thought a DataList because of
the RepeatLayout and
RepeatDirection properties, but I don't see how to make it "break" to the
next room when there is
an uneven number of beds for a room.

2. Any other guidance, advice, or references on how to accomplish this.

I appreciate any input.

Thanks,

Mike
 
P

Phillip Williams

Hi Mike,

Regarding the choice of which databound control to use: do you need to page
through the list or will it all be displayed on one page? If you want to page
it through it, use a datagrid. I have a similar example, except that it
allows edit, at this link
http://www.societopia.net/samples/DataGrid_Hierarchy.aspx

Regarding how to make the breaks between the rooms records, you will find
the above example relying on the data structure to create the breaks without
having to mind this in the presentation layer. (Of course you can change the
style using CSS to whatever break styles you want)
 
M

Mike Robbins

Thanks, Phillip.

I don't need the paging, but I will look at your example. Thanks for
sharing.

Mike
 
P

Phillip Williams

You are quite welcome Mike. I have also added quickly an adaptation of the
previous sample to work using the DataList at this link
http://www.societopia.net/Samples/DataList_Hierarchy.aspx

This sample is closer to what you are looking for because I structured the
data in it such as the first record in the parent table contains the same
fields that are displayed on the child table so that the first line would
look indented as you were trying to achieve. Notice the applied style sheet
properties that achieve the margin-left (the source code is available there)
 
M

Mike Robbins

Super. Thanks so much.

Mike
Phillip Williams said:
You are quite welcome Mike. I have also added quickly an adaptation of the
previous sample to work using the DataList at this link
http://www.societopia.net/Samples/DataList_Hierarchy.aspx

This sample is closer to what you are looking for because I structured the
data in it such as the first record in the parent table contains the same
fields that are displayed on the child table so that the first line would
look indented as you were trying to achieve. Notice the applied style sheet
properties that achieve the margin-left (the source code is available there)

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top