Answer the question
In order to leave comments, you need to log in
How to create a dropdown list with checkboxes?
Good day! Immediately I apologize for the perhaps incorrectly asked question in the title, I will try to explain the whole point.
I have a model RecordVM
, it contains a collection of objects ( RecordVM.Collection
) - entries in the database. Each entry has a list of groups - List<DBEGroup> Groups
. The point is that in each entry, several groups can be selected from GroupsVM.Collection
, which are added to this list.
In the program interface, I use a DataGrid, in which I would like to do something like a ComboBox, but with the ability to select multiple groups.
That's actually the question: how can I make it so that, by ticking a certain group, it would be added to the list of groups of the current record, i.e. something like RecordVM.SelectedItem.Groups.Add(CheckedGroup)
?
The SelectedItem
DataGrid's property is associated with the propertyRecordVM.SelectedItem
.
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
{% for buzz in lal %}
<div class="dropdown">
<a id="dLabel" role="button" data-toggle="dropdown" class="btn btn-default" data-target="#" href="">
{{ buzz.name_part.title}} <span class="caret"></span>
</a>
<ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu">
<li class="dropdown-submenu">
{% for bar in buzz.rozdils %}
<a tabindex="-1" href="#">{{ bar.title }}</a>
<ul class="dropdown-menu">
{%for det in buzz.details%}
<li><a href="#">{{det.name}}</a></li>
{% endfor%}
</ul>
{% endfor%}
</li>
</ul>
</div>
{% endfor%}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question