Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Which data control to use and how???

Status
Not open for further replies.

baden

Programmer
Feb 6, 2002
125
US
I am planning on using the DataGrid control to allow users to select interest categories.

Here's an example of the InterestCategory description & subcategories as done in a simple data-bind.

Code:
icDescription iscDescription 
Bar / Night Club  Dance Club 
Bar / Night Club  Lounge 
Bar / Night Club  Pre-Club Hangout 
Bar / Night Club  Pubs 
Bar / Night Club  Sports Bar 
Desserts Cakes 
Desserts Cookies 
Desserts Ice Cream 
Desserts Mousse 
Desserts Pastries 
Desserts Pies 
Dining  African 
Dining  Chinese 
Dining  Contemporary

So the thing is that I would like to display the icDescription only once until it changes.

Would it be best to use a Repeater or DataList control, and if so (or if the DataGrid control is recommended), how would I do it?

Looking for this (checkbox controls will be added later):

Code:
Bar / Night Club  
     Dance Club 
     Lounge 
     Pre-Club Hangout 
     Pubs 
     Sports Bar 
Desserts 
     Cakes 
     Cookies 
...

 
I'd recommend using the Repeater control unless you are going to allow users to actually edit any data that you are showing them (and then I'd use the DataGrid).

You are basically looking for "nested repeaters" (or "nested datagrids" if you go with that option). They are both fairly easy to implement and if you search google you'll come up with lots of examples - post back here if you have any specific problems with them.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top