Dynamic checkboxes and selection

  • Thread starter Thread starter sck10
  • Start date Start date
S

sck10

Hello,

I have a list of products (SQL Server) that I need to show with check boxes
next to them. Once they submit the form, the items checked will be inserted
into a table. I think I need to use a CheckBoxList, but how do I show what
has been matched in the future. For example, I check 5 of the 10 products
for a particular customer. When I edit that customer's information, I want
to show the 10 products with the 5 products that I check previously to be
checked.

Any help with this would be appreciated...
 
You need to iterate through the collection of items and set the Checked
property to true for the ones that you want checked.

You can also use a Repeater or a DataView with a checkbox column and bind
the checkbox's Checked property to a field on your datasource.
 
Thanks Fernando,

sck10


Fernando Rodriguez said:
You need to iterate through the collection of items and set the Checked
property to true for the ones that you want checked.

You can also use a Repeater or a DataView with a checkbox column and bind
the checkbox's Checked property to a field on your datasource.
 
Back
Top