V
V
Vadim2016-04-29 12:39:47
WPF
Vadim, 2016-04-29 12:39:47

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.
8d20b55973944a158257063f2f9f8ef7.png
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 SelectedItemDataGrid's property is associated with the propertyRecordVM.SelectedItem.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sim3x, 2015-05-22
@zelsky

!
for the sake of decency, do get_abs_url as I said in the last answer

Z
zelsky, 2015-05-22
@zelsky

{% 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 question

Ask a Question

731 491 924 answers to any question