How to create an array or list of checkboxlists ASP.NET

I know how to use checkboxlist in ASP.NET to display parameters retrieved from the database. What I do not know how to do is to make it two-dimensional. That is, I need a list of flags, where I do not know how long this list is; both dimensions of the checkbox will be determined

list of people (extracted from the database) list of tasks (pulled from the database)

and the web page user will click in the column / row to indicate who will be assigned which tasks.

Right now, I think my only option is to reinstall it by creating a table and filling each cell with its own checkbox. (Fu)

Is there a more elegant way to create a two-dimensional array of checkboxes with labels for both rows and columns?

+3
source share
5 answers

I would use a relay along with checkboxlist. Depending on how your database is configured, you may have a binding to each check box.

+2
source

I have done this before and resorted to the brute force method that you suggest.

This is not as nasty as you think. Other decisions that were declarative and data-bound would probably be just as confusing and confusing.

0
source

GridView. , CheckBoxField.

0

ASPxGridView DevExpress. Selected ( - ), , . , , . DevExpress .

0

, AJAX Control Toolkit . , , .

0

Source: https://habr.com/ru/post/1697396/


All Articles