# Dropdownlist , getting selected Textproperties

**URL:** <https://forum.radzen.com/t/dropdownlist-getting-selected-textproperties/2391>\
**Category:** Angular\
**Created:** [January 20, 2020, 12:55pm UTC](https://forum.radzen.com/t/dropdownlist-getting-selected-textproperties/2391 "2020-01-20T12:55:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcanavar](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@mcanavar](https://forum.radzen.com/u/mcanavar)\
**Post date:** [January 20, 2020, 12:55pm UTC](https://forum.radzen.com/t/dropdownlist-getting-selected-textproperties/2391/1 "2020-01-20T12:55:51Z")

</div>

Hi ,  
We can use dropdownlist and enable them for multiple selected options.  
The value part we can assign to a page property and get the values with a map.  
like: ${pagePropertyDDL.map(id =\> "'" + id + "'").join(', ')

I want also to be able to get the textproperty ,  
like: ${pagePropertyDDL.map(name =\> "'" + name + "'").join(', ')

Now the selected text is displayed in the dropdown after selecting the options , I want to use this in a overview to display the selected text options.  
Is this possible?  
Also after selecting more options than can fit into the dropdownlist area , the text is shown : "Selected 13 items " , this text is not exposed and can not be translated .

Hope you can help .  
Best Regards / Mehmet

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [January 20, 2020, 1:36pm UTC](https://forum.radzen.com/t/dropdownlist-getting-selected-textproperties/2391/2 "2020-01-20T13:36:49Z")

</div>

Hi @mcanavar,

If you don't set ValueProperty then the Value of the DropDown will contain the "whole" data item. So you can do

`${pagePropertyDDL.map(o => "'" + o.ValueProperty + "'")`

and

`${pagePropertyDDL.map(o => "'" + o.TextProperty + "'")`

Here are a few screenshots:

1. DropDown configuration - Data, TextProperty and Value are set. ValueProperty isn't. ![image](https://forum.radzen.com/uploads/default/original/2X/8/8aca9469d9548e2287c951d93be8bf9832d0262b.png)
2. Keep the selected item texts in a page property (in the Change event of the DropDown).  
 ![image](https://forum.radzen.com/uploads/default/original/2X/5/5dbb54895630211a87f7d3c2d10ccdafbb84ef04.png)
3. Keep the selected item values in another page property.  
 ![image](https://forum.radzen.com/uploads/default/original/2X/9/9158af57bc3f67b36cb30b96b3a360c499e0d436.png)

> Also after selecting more options than can fit into the dropdownlist area , the text is shown : "Selected 13 items " , this text is not exposed and can not be translated .

We will see if the PrimeNG DropDown that we use supports this setting. If it does we will expose it as a property of the DropDown component.

---

<div class="post-metadata">

**Author:** ![mcanavar](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@mcanavar](https://forum.radzen.com/u/mcanavar)\
**Post date:** [January 20, 2020, 3:03pm UTC](https://forum.radzen.com/t/dropdownlist-getting-selected-textproperties/2391/3 "2020-01-20T15:03:10Z")

</div>

Hi,  
Great , this is exactly what I want!  
Is this undocumented ? or do I have to search somewhere else ?

Thank you for hour excellent support!

---

<div class="post-metadata">

**Author:** ![mcanavar](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@mcanavar](https://forum.radzen.com/u/mcanavar)\
**Post date:** [January 20, 2020, 3:19pm UTC](https://forum.radzen.com/t/dropdownlist-getting-selected-textproperties/2391/4 "2020-01-20T15:19:11Z")

</div>

Getting : ![image](https://forum.radzen.com/uploads/default/original/2X/d/d7b8b80326a6fa8030af9aeb0ee0b98c6d81f6e6.png)  
What can I do

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [January 20, 2020, 3:27pm UTC](https://forum.radzen.com/t/dropdownlist-getting-selected-textproperties/2391/5 "2020-01-20T15:27:10Z")

</div>

There is probably some recursive code running at the moment. You can try debugging it like [this](https://www.radzen.com/documentation/debugging/). In case you cannot discover what the problem is you can send us your project over email.

---

<div class="post-metadata">

**Author:** ![mcanavar](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@mcanavar](https://forum.radzen.com/u/mcanavar)\
**Post date:** [January 20, 2020, 3:34pm UTC](https://forum.radzen.com/t/dropdownlist-getting-selected-textproperties/2391/6 "2020-01-20T15:34:17Z")

</div>

It was indeed, infinite loop , could only solve it getting into the json file and removing the code.  
Thank you

---

<div class="post-metadata">

**Author:** ![mcanavar](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@mcanavar](https://forum.radzen.com/u/mcanavar)\
**Post date:** [January 21, 2020, 1:23pm UTC](https://forum.radzen.com/t/dropdownlist-getting-selected-textproperties/2391/7 "2020-01-21T13:23:33Z")

</div>

Thank you for the update!
