Getting (empty) and (none) value in a dropdown search wherever I am having Enums in the mendix

Hi Team, when I use the dynamic dropdown and bind the data as enums then it show first value as empty or none I just want to remove the empty value from the dropdown how can I do that, Please provide the suggestion.  
2 answers

Unfortunately there is no built-in function to do this. You can, however, use Javascript to remove the empty value.

These posts are not exactly the same as they are about data grid filters, but they provide a similar solution:

How do you hide (empty) in Drop-down Search Fields of Data Grids

"Empty" value always comes in While using it as a Data Grid filter field

Alternatively, you could consider using a different widget if it fits your design (e.g. radio buttons instead of a dropdown).


Hi rahul,


For the dropdown add the caption as empty and by using the javascript we can hide the empty based on caption value. Find the field name and Add the javascript snippet and use the below code to hide the empty value.


$('.dropdown-menu li:contains((empty))').hide();

Hope this is fullfill your requirement.