EmptyMessage only displays when AllowCustomText is set to true. Why? If we set AllowCustomText to true, then user can enter any text to the combobox which will bypass my requiredfieldvalidator.
You can set the AllowCustomText property to True and then prevent the user from typing in the textbox usingclient side code. Here is the code for achieving the functionality;
JavaScript:
<script type="text/javascript">
function OnLoad(sender, args) {
var combo = sender;
var input = combo.get_inputDomElement();
input.onkeydown = onKeyDownHandler;
}
function onKeyDownHandler(e) {
if (!e)
e = window.event;
e.returnValue = false;
if (e.preventDefault) {
e.preventDefault();
}
}
</script>
Also check the following forum link which discussed similar scenario.