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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Advice, please help!

Status
Not open for further replies.

Anakin2112

Programmer
Feb 20, 2003
9
0
0
US
I am getting the hang of dotNET, but still a little unsure of how datagrids, datalists, and repeaters work when creating dynamic controls inside of them. So I need some advice from anyone. I want to create a list of names with a corresponding checkbox next to each name. Each row will contain 4 or 5 names (and checkboxes).

So my question is what route should I take? I think that the datalist with placeholders is the solution, but I wanted to get someone else's opinion. Anyone have any ideas?
 
I assume you want the user to be able to check one or more items and then submit the form?

>>Each row will contain 4 or 5 names (and checkboxes).

This would indicate to me that you would most likely need to use a datalist or repeater, since the datagrid is really only good for one item per line, as in a chart. Not the multi-column list you are refering to. The datalist has a repeat-columns attribute that you can set. Probably what you need.

There is also the CheckBoxList control which has similar use, but I'm not sure how to bind the id values to data dynamically.

For some reason, using checkboxes in asp.net is tricky. I try to avoid creating them dynamically. It may be that the use of checkboxes is being deprecated as we move into the mobile/wireless age, and we should try to find alternate gui designs.

There might be a FAQ somewhere that explains how to use checkboxes better than I can. If someone has figured this one out perhaps they should post it as a FAQ.

I hope this is of some help and I haven't added more confusion!
 
thanks for the reply. You have helped, but I have another question.

So is the main difference between datalists and repeaters, the fact that you can edit and select with the datalist and not with the repeater?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top