vendredi 20 février 2015

.NET MVC Flowing Columns of Variable Number of Checkboxes

I'm presenting filtering criteria to user: they can select multiple value per field so I need/want to present groups of checkboxes.


I'm doing that now and xferring data to/from controller successfully based on the articles I've found (such as this). I've got this: (rows of checkboxes under collapsible headings)



|_Sites_______________|
_ Site A
_ Site B
_ Site C
|_Types_______________|
_ Type X
_ Type Y


But the number of entries can vary widely across clients, so rather than having a looooong list, I want to flow them - and it's OK if the user has to scroll horizontally because they've got so many.



|_Sites___________________________________________|
_ Site A _ Site with a really long name _ Site F
_ Site B _ Site D _ Site G
_ Site C _ Site E


All the references I see use an EditorTemplate given a collection of items (which I'm doing) - but always result in vertical lists.


I can certainly grunt through it and generate all the HTML myself, but I'm hoping there's a more elegant solution. It doesn't have to be an HTML table - that's just my first guess.


Thanks, Dan





Aucun commentaire:

Enregistrer un commentaire