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

How do I show a sectioned list?

I'm coming from ASP and learning ASP.NET with VWD Express. I have a page in
ASP that shows an employee list by sections in a table like this:

East Coast
Person 1 in this category | Office Location | Phone
Person 2

North Central
Person 1
Person 2

South Central
Person 1
Person 2

West Coast
Person 1
Person 2

National Accounts
Name
Name
In ASP, I have an ADO recordset that contains just the categories in the
order they should display (select region_id, region_name order by
region_display_order from sales_regions), and another with the names that is
sorted by region and name (select region_id, name_last, name_suffix_gen,
name_first, name_middle from sales_reps order by region_id, name_last,
name_suffix_gen, name_first, name_middle). I loop through the regions, set
the filter on the reps to the region, and response.write the names until I
hit the end. This has worked fine for ages. (If it matters, the database
is Access 2003, and must remain that as SQL2005 is completely out of the
question until our hosting contract runs out in June.)

How do I change this to take advantage of ASP.NET's features and get rid of
that clunky, ancient looping code? The list uses CSS styles for the section
name cells, as well as the names. The names also are hyperlinks that the
viewer can click on to send them an email. I am completely lost as to how
to use datalists or repeaters or whatever to make this work. Can someone
point me to an example of how to do this using VB (sorry, I can't cope with
also trying to figure out C# at the moment), or post a step-by-step
walkthrough? Thanks.
Nov 23 '05 #1
3 1030
Hi,

read up on template columns (which you'll need) on MSDN:
http://msdn.microsoft.com/msdnmag/issues/02/01/cutting/

Grtz, Wouter van Vugt

Trainer - Info Support - www.infosupport.com
www.dive-in-it.nl

Nov 23 '05 #2
But how is this done for a variable number of groups/sections, which must
appear visually distinct like I showed in my example:

One Group
An Item
Another Item

Another Group
First Item
Second Item
Third Item

I can't hard code the groups, since I need to reuse the technique for other
pages as well. It must be driven by the number of records that appear in
that category's a "group" table, not set number of repetitions. It's like a
master-detail, but with everything already expanded when the page is
displayed and not requiring the user to click on anything to make it
visible. This is also read-only to the user. I see these on many sites, so
someone must be able to tell how to do it.

"Wouter van Vugt" <wo*****@infosupport.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi,

read up on template columns (which you'll need) on MSDN:
http://msdn.microsoft.com/msdnmag/issues/02/01/cutting/

Grtz, Wouter van Vugt

Trainer - Info Support - www.infosupport.com
www.dive-in-it.nl

Nov 24 '05 #3
PS: I am using ASP.NET 2.0, not 1.x and VWD Express.

"Confused Newbie" <no**@spam.duh> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
But how is this done for a variable number of groups/sections, which must
appear visually distinct like I showed in my example:

One Group
An Item
Another Item

Another Group
First Item
Second Item
Third Item

I can't hard code the groups, since I need to reuse the technique for
other pages as well. It must be driven by the number of records that
appear in that category's a "group" table, not set number of repetitions.
It's like a master-detail, but with everything already expanded when the
page is displayed and not requiring the user to click on anything to make
it visible. This is also read-only to the user. I see these on many
sites, so someone must be able to tell how to do it.

"Wouter van Vugt" <wo*****@infosupport.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi,

read up on template columns (which you'll need) on MSDN:
http://msdn.microsoft.com/msdnmag/issues/02/01/cutting/

Grtz, Wouter van Vugt

Trainer - Info Support - www.infosupport.com
www.dive-in-it.nl


Nov 24 '05 #4

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

Similar topics

2
by: steven | last post by:
Hi, sorry for the crosspost, but I'm not sure if my problem is with the HTML or the CSS :-( URL: http://www.nenya.be/temp/list.htm I have a list with in each list item a text + link which are...
3
by: Sam | last post by:
I wrote a script to show or hide items in an HTML list (<ul id="stuff">) depending on whether a list-item's CLASS attribute matches an input string (catString), which is chosen from a SELECT menu....
1
by: Georg Scholz | last post by:
Hello, The class "Control" contains a documented Property "ControlType". So for example, in a form, you can write code like this: Dim c as control set c = me.Controls("textbox1") if...
3
by: RJN | last post by:
Hi The texts in the dropdown are too long and the width is not sufficient to show the entire text. Increasing the width is not an option. Is there a way to show the selected item text as a...
3
by: yzi | last post by:
I have a list form and a detail form . Before, I open the List form, use form.showDialog(),then I click List Item and open the Detail Form by form.show(). now , user need when the list form...
0
by: mel_apiso | last post by:
Hi, after uncatalog one database, and catalog again with other name, if I try to connect with this database, everything is ok, but list applications only show me the connection with the...
2
by: Zeljko | last post by:
I'm creating Address book. Header of the main form (frmAddress) contains combo box (cboFilter) to filter records by Occupation on main Form(Ocupation1). That's working. Combo box also have "Show...
22
by: Zytan | last post by:
I have public methods in a form. The main form calls them, to update that form's display. This form is like a real-time view of data that is changing. But, the form may not exist (it is...
1
by: basavaraj koti | last post by:
I need to show image using xslt Below provided in my xml and xslt. <?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl" href="../xyz.xsl"?> <Grade class="03"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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:
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...

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.