473,406 Members | 2,847 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,406 software developers and data experts.

Manually creating ordered lists - need help

I'm currently run into a snag on one of my projects. We need to create an
ordered list (Mutli levels).

Ie:
1. Some Title
....A....Something here
....B....Something Else
2. Another Title
....A.....I'm here Again
........a....And again.
.............1....One more indent
3..and another

(I don't know if what I typed up there will appear that way... it should)
without the dots.
I have 2 DataTables. One has all the Titles, and the titles that have the
indent. THen I have all the items that go under those titles the other
DataTable.

There are no Child-Parent relations, instead I've used an "Indent" column
(int) that tells me how many times to indent that title, then all items
under that Title will be moved over X amout of pixels.

THe other night I was thinking about using a Recursive loop for this, but
don't know where to start. I'm doing this in C#, and it is being rendered to
PDF so I have some control over how to put the lists.

I can't use HTML.

ANy help would be awesome!

thx.
Oct 17 '05 #1
2 1558
Ryan - how do you know which song goes with the title? Is there a
prohibition for using a relationship for this would certainly make the
problem much easier. You could foreach the Titles, then use GetChildRows
for the songs and easily iterate through this.
"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:ei**************@TK2MSFTNGP12.phx.gbl...
I'm currently run into a snag on one of my projects. We need to create an
ordered list (Mutli levels).

Ie:
1. Some Title
...A....Something here
...B....Something Else
2. Another Title
...A.....I'm here Again
.......a....And again.
............1....One more indent
3..and another

(I don't know if what I typed up there will appear that way... it should)
without the dots.
I have 2 DataTables. One has all the Titles, and the titles that have the
indent. THen I have all the items that go under those titles the other
DataTable.

There are no Child-Parent relations, instead I've used an "Indent" column
(int) that tells me how many times to indent that title, then all items
under that Title will be moved over X amout of pixels.

THe other night I was thinking about using a Recursive loop for this, but
don't know where to start. I'm doing this in C#, and it is being rendered to PDF so I have some control over how to put the lists.

I can't use HTML.

ANy help would be awesome!

thx.

Oct 18 '05 #2
The Titles Table has a HeaderID field. Each Item also has a HeaderID in it.

Currently I run through 2 for loops to get the current list (which prints
out perfectly, with indenting), I just need to stick the numbers/letters
(bullets) where they need to go.

The GetChildRows would do exactly what I'm doing now. I just don't know how
to do the logic of building the numbering... I have an Idea though:

Recursive Function BuildList(Previous.Indent, Previous.LetterNumberUsed,
bool StartAgain)
{
Do a check to see if this is the Base Number

......Is this row.indent > last row.indent?
.........BuildList(row.indent, row.letter, true)
.....Else
.........AddItem(ItemNameAndInformation, LetterToBeUsed)

}

I think a recursive function would be best, so I'll play around with it.

/RT
"P. Van Den Goess" <Pe**************@leaveoutplease.gmail.com> wrote in
message news:%2****************@TK2MSFTNGP09.phx.gbl...
Ryan - how do you know which song goes with the title? Is there a
prohibition for using a relationship for this would certainly make the
problem much easier. You could foreach the Titles, then use GetChildRows
for the songs and easily iterate through this.
"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:ei**************@TK2MSFTNGP12.phx.gbl...
I'm currently run into a snag on one of my projects. We need to create an
ordered list (Mutli levels).

Ie:
1. Some Title
...A....Something here
...B....Something Else
2. Another Title
...A.....I'm here Again
.......a....And again.
............1....One more indent
3..and another

(I don't know if what I typed up there will appear that way... it should)
without the dots.
I have 2 DataTables. One has all the Titles, and the titles that have the
indent. THen I have all the items that go under those titles the other
DataTable.

There are no Child-Parent relations, instead I've used an "Indent" column
(int) that tells me how many times to indent that title, then all items
under that Title will be moved over X amout of pixels.

THe other night I was thinking about using a Recursive loop for this, but
don't know where to start. I'm doing this in C#, and it is being rendered

to
PDF so I have some control over how to put the lists.

I can't use HTML.

ANy help would be awesome!

thx.


Oct 18 '05 #3

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

Similar topics

2
by: Ken Fine | last post by:
(originally posted to one of macromedia's groups; no help, so hopefully someone here can help me out. I'm using VBScript ASP.) When designing administrative interfaces to websites, we often need...
33
by: Jim Cobban | last post by:
I cannot get Netscape 4.79 to properly display the ordered list in the following fragment. <P>Get a specific portion of the date. Depending upon the value of index: <ol start=0> <li>complete...
1
by: James | last post by:
I am creating a system whereby equipment is inspected. Data is inputted into an inspection form. However, any equipment that is not satisfactory needs to have spare parts ordered for that piece of...
210
by: Christoph Zwerschke | last post by:
This is probably a FAQ, but I dare to ask it nevertheless since I haven't found a satisfying answer yet: Why isn't there an "ordered dictionary" class at least in the standard list? Time and again...
2
by: Ryan Ternier | last post by:
I'm currently run into a snag on one of my projects. We need to create an ordered list (Mutli levels). Ie: 1. Some Title ....A....Something here ....B....Something Else 2. Another Title
1
by: Najib Abi Fadel | last post by:
Hi i have an ordered table of dates let's say: 1/1/2004 8/1/2004 15/1/2004 29/1/2004 5/2/2004 12/2/2004
1
by: m.k.ball | last post by:
What is the best way to achieve alphabetically ordered lists that will index phrases starting with 'The' as if the word was at the end rather than the start of the phrase? Michael
22
by: bearophileHUGS | last post by:
>From this interesting blog entry by Lawrence Oluyede: http://www.oluyede.org/blog/2006/07/05/europython-day-2/ and the Py3.0 PEPs, I think the people working on Py3.0 are doing a good job, I am...
2
by: Kirk Strauser | last post by:
Short question: Is there a good library for generating HTML-style tables with the equivalent of colspans, automatically sized columns, etc. that can render directly to PDF? Longer question: ...
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: 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
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
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.