PDA

View Full Version : Alphabet row header for an A-to-Z listing


snensi
04-07-2005, 09:09 PM
I have an ASP page that displays the entire Access Table which has 4 columns (first one is the NAME). The list does appear fine aphabetically.

The only issue I have is to have a divider ROW between the consequtive Letters when they start... What I mean is:
Lets say I have:
AAAA
ABCS
AKLL
BBBB
BBSD
BNNS
Then I want a Row that is like a divider between
AKLL & BBBB (with B in the header as a divider row followed by the rows with the NAMEs beginning B and then C header followed by the data beginning with Names starting with C. (See the sample image of how I'd like the Row Divider by Letter)

I have also attached the Code (no database, images, or includes added)... just Code as I believe Coders out there will be able to understand what my code is trying to achieve.

If you need a database to make it work - let me know and I can create a dummy for this purpose...

thanks in advance for any efforts and support in this issue...
waiting for assistance
Sal

A1ien51
04-07-2005, 10:20 PM
without looking at your code. I am assuming you are looping to create the table

Do a check on the string to see what the first character is. When you see that is has changed, add a row before it.

Eric

snensi
04-07-2005, 10:21 PM
Do a check on the string to see what the first character is. When you see that is has changed, add a row before it.

Please expand - Assist me in LINE numbers and actual code.

thanks