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

Category Subcategory display in Dropdown list

Hello,
I m developing application of link directory using VS-2005. In this
application i have a dropdownlist.
In dropdownlist i want to display categories, sub-categories,
sub-sub-categories upto any level
(for eg. country--state--district--city--village etc.)
The dropdownlist will look like
Arts
--camera
--photography
----General Photos
----Digital Photos
Company
--employee
----Jr. employee
----Sr.employee
--Manager
----HR manager
----General manager
here i shown categories upto 3 levels but, levels will be 4-5 or more
In database table i have two columns named categoryid(primary key of
categories table) & another one is
parentid(which stores value of main categoryid)
eg. in above dropdown items, categoryid for Arts category is 1 and parentid
is 0. & parentid of Arts(i.e. 1)
is parentid of camera & photography & like this will continue

if anyone have solution for finding subsub-categories them reply me

I have done this upto two levels & but it will not produce recursively

Thanks


Sep 16 '06 #1
1 3815
You should use Treeview perhpas.

chanmm

"Nitin Nikam" <ni*********@cityit.inwrote in message
news:O$**************@TK2MSFTNGP03.phx.gbl...
Hello,
I m developing application of link directory using VS-2005. In this
application i have a dropdownlist.
In dropdownlist i want to display categories, sub-categories,
sub-sub-categories upto any level
(for eg. country--state--district--city--village etc.)
The dropdownlist will look like
Arts
--camera
--photography
----General Photos
----Digital Photos
Company
--employee
----Jr. employee
----Sr.employee
--Manager
----HR manager
----General manager
here i shown categories upto 3 levels but, levels will be 4-5 or more
In database table i have two columns named categoryid(primary key of
categories table) & another one is
parentid(which stores value of main categoryid)
eg. in above dropdown items, categoryid for Arts category is 1 and
parentid
is 0. & parentid of Arts(i.e. 1)
is parentid of camera & photography & like this will continue

if anyone have solution for finding subsub-categories them reply me

I have done this upto two levels & but it will not produce recursively

Thanks


Sep 17 '06 #2

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

Similar topics

0
by: Brian Murphy | last post by:
<?php /* I need your help. I'd be very thankfull if write me this script.I need a script that displays a list of categories and subcategories like this: <select name="category"> <option...
5
by: Travis Pupkin | last post by:
Hey, I've done a number of product catalogs/galleries with one or two category levels (Category > Subcategory). The straightforward way to do this, of course, is to use database fields for...
3
by: Rich Protzel | last post by:
Hello, So my table contains say 100,000 records, and I need to group the categories in fld1 by the highest count of subcategories. Say fld1 contains categories A, B, C, D, E. All of these...
2
by: shane-dated-1130371478.43db8f | last post by:
Hello all, I am working on a website for a bookstore and have run into a bit of a snag. I am trying to write a form where an admin can set the category for a book. However, categories can be of...
0
by: Paul Hendryx | last post by:
I have the table structure: CREATE TABLE . ( IDENTITY (1, 1) NOT NULL , NOT NULL , NULL , (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ) ON GO
1
by: vinayg | last post by:
how can i search subcategory wise for a particular category,i want to display items.suppose user selected a particular category.I want to display all items in that category + its subcategories. ...
0
by: Kay | last post by:
Hello, I have written my own custom control and I want one of its properties to display as a dropdown list when clicked, so the user can select from the list, it would be similar to the asp...
34
gcoaster
by: gcoaster | last post by:
Hello Everyone! I have a question regarding "cascading combobox(s) list(s)" I would like: ComboBox 2 to show results from ComboBox 1's selection, then ComboBox 4 to show results from...
2
by: theS70RM | last post by:
Hi, I have a table thats laid out something like the following.... cat_id, cat_name, cat_parent 1 furniture null 2 electrical null 3 tvs 2 4 desks ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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
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...

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.