Data driven menu problem

P

Paul

I am considering creating an app that will have an increasing number of
items about which there's information. As info is added about a
different new item (they're medicines, but that's not really that
important) it'll be added to the index.

I want users to be able to search for them in chunks (as well as a
standard "enter the 1st few characters of the name" - that bit's easy!)

What I want is to have some links across the top of the page that might
initially say "A-M" & "N-Z" clicking on them will bring a list of the
required items. However, as the number of items increases over the next
year or so as items are added, it might be more appropriate to have more
(smaller) categories (say A-G, H-R & S-Z or even more.....)

To this end, i have written a SQL server stored proc that takes a
parameter of the form "A-D" and fetches the required records. (It even
recognises single letter ranges.)

I also have a small table with the letter ranges. It is these that I
want to display across the page. My caveat is that I want the HTML &
Code behind remain constant such that changing the ranges in the SQL
table will be reflected in the user's page with no change in the HTML
and no re-compilation of the app.

This is where I'm stuck. A data grid seems only to be able to display
vertically. A data list can be horizontal, but can it cope
automatically cope with changing numbers of data items? (If it can,
that could be my solution!)

(I know that a radio button list would work, but that wouldn't fit with
the overall look and feel of the rest of the site.)

A colleague suggested a stored proc to effectively pivot my table by
creating a new table with a column for each row, but I feel there must
be a more elegant way.

I'm by no means an expert at ASP.Netbut if someone can suggest a way
that'll achieve what I want, I'll happily work out how to do it (what
i'm trying to say is that I;m not expecting anyone to write the code for
me (but wouldn't refuse, if someone did! :) )

Thanks
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top