cancel
Showing results for 
Search instead for 
Did you mean: 

remove default entry from drop down

Former Member
0 Kudos

How can i remove the default entry from a dropdown element?

Florin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Florin,

For context node, that serves as item source for your DropDownByIndex, set selection cardinality to 1..1

VS

Former Member
0 Kudos

i created a new value node with cardinality 1.1 and selection 1.1.

i created a new value atribute and i assigned the property selectedkey to this attribute.

It still not working. I still have a default entry.

The default entry is not in the dropdown list because when i try to select something i can only see my items. But first time when i load this view default selected key is an empty value.

Florin

Former Member
0 Kudos

Hi Florin,

If you are using DropDownByKey, just setting the current selection to some key value will remove the default blank entry.

wdContext.current<node name>Element().set<attribute>(<key value of the selected data>);

This will set the value corresponding to this key as the currently selected one in the dropdown and along with this, the default entry will also disappear

Hope this helps,

Best Regards,

Nibu.

Answers (0)