Question add x-number of checkboxes dynamically. Gridview with multiple colums?

mmy

Member
Joined
Oct 5, 2007
Messages
24
Programming Experience
1-3
Hi,
hope to get a tip or good practice method to become this result...

I'm using an SQL command to read 1 column (example: name), returning a x-number of records.

I want to display these results as a checkbox item on a webpage. Since it's only 1 column, showing all these records row by row won't look good.
So I want to show these items divided into for example 5 columns, and then row by row.

example: 80 records -> showing 16 rows of 5 checkboxes (side by side, each in a column)
example: 73 records -> showing 14 rows of 5 checkboxes (side by side) and the last row showing 3 checkboxes

I can show the results in a gridview, but this is row by row.
I have to add the checkboxes dynamically since I need to know which checkboxes are selected. So, I don't think adding a lot of checkboxes and hiding/showing them is an option.
 
Top Bottom