# Dynamic One-to-Many Checkbox List?

**URL:** <https://forum.radzen.com/t/dynamic-one-to-many-checkbox-list/1092>\
**Category:** Angular\
**Created:** [April 9, 2019, 1:44am UTC](https://forum.radzen.com/t/dynamic-one-to-many-checkbox-list/1092 "2019-04-09T01:44:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DarKow](https://forum.radzen.com/letter_avatar_proxy/v4/letter/d/4af34b/32.png) [@DarKow](https://forum.radzen.com/u/DarKow)\
**Post date:** [April 9, 2019, 1:44am UTC](https://forum.radzen.com/t/dynamic-one-to-many-checkbox-list/1092/1 "2019-04-09T01:44:26Z")

</div>

I'm trying to build a simple UX with one-to-many options that can be selected for a user. Kind of like master-detail, but I don't want the complexity of a child grid. I just wanted some checkboxes. The issue is that the list of options is data driven, not a fixed list. Is is possible to dynamically bind the options in a checkbox list? I haven't been able to figure it out. Binding to a simple data object with Text and Value properties doesn't work. If not this, what's the next most simple way to accomplish my goal?

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [April 9, 2019, 5:35am UTC](https://forum.radzen.com/t/dynamic-one-to-many-checkbox-list/1092/2 "2019-04-09T05:35:58Z")

</div>

Hi @DarKow,

You can bind CheckBoxList to some array coming from your database like this:

```auto
${result.value}.map(c => { return {text: c.CompanyName, value: c.CustomerID} })

```

 ![image](https://forum.radzen.com/uploads/default/original/2X/8/83863c678fff1e6bc9589c72cd8edfa5702c319c.png)

 ![image](https://forum.radzen.com/uploads/default/original/2X/b/bc1670ef26cf8601eb81b842a6b906a66a25c7a3.png)

 ![image](https://forum.radzen.com/uploads/default/original/2X/f/f77d1ee378d424562476900e41b51b70aba2ec3a.png)

---

<div class="post-metadata">

**Author:** ![DarKow](https://forum.radzen.com/letter_avatar_proxy/v4/letter/d/4af34b/32.png) [@DarKow](https://forum.radzen.com/u/DarKow)\
**Post date:** [April 9, 2019, 8:06pm UTC](https://forum.radzen.com/t/dynamic-one-to-many-checkbox-list/1092/3 "2019-04-09T20:06:10Z")

</div>

Thanks. I was close yesterday, but not quite. This works as expected. 😀

Would be a good thing to add to the component documentation.
