This is a migrated thread and some comments may be shown as answers.

EmptyMessage doesn't show when CheckBoxes is set to true

2 Answers 112 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Evgeniya
Top achievements
Rank 1
Evgeniya asked on 21 Jan 2016, 06:08 PM

Hi, 

 

I am using version 2014.3.1209.40 and I have the following combo box:

<telerik:RadComboBox ID="ddCostCenter" runat="server" CheckBoxes="true"  EmptyMessage="Select Cost Center" > </telerik:RadComboBox>

If I remove CheckBoxes="true" the empty message shows on initial load, otherwise it doesn't.

How should I set it up, so EmptyMessage shows on initial load when I have the checkboxes?

Thanks!

 

2 Answers, 1 is accepted

Sort by
0
Evgeniya
Top achievements
Rank 1
answered on 21 Jan 2016, 08:18 PM

This behaviour goes away if I specify CheckedItemsTexts="DisplayAllInInput" but I don't want to do that.

 Also, how should I replace the message "All items checked"when all items are checked with my message?

 Thanks.

0
Accepted
Ivan Danchev
Telerik team
answered on 26 Jan 2016, 01:11 PM
Hello Evgeniya,

The missing empty message on load, when check boxes are enabled, was a bug in the 2014 version of the controls and is not present in the latest official version. If you are using the old version a possible workaround would be to set the empty message in the ComboBox' OnClientLoad client-side event handler as demonstrated below:
<script>
    function OnClientLoad(sender) {
        sender.set_emptyMessage("Select an Item");
    }
</script>
 
<div>
    <telerik:RadComboBox ID="RadComboBox1" runat="server" CheckBoxes="true" EmptyMessage="Select an Item"
        EnableCheckAllItemsCheckBox="true" OnClientLoad="OnClientLoad">
        <Localization AllItemsCheckedString="My custom message" />
    </telerik:RadComboBox>
</div>

The code snippet also answers your second question showing how you can change the default "All items checked" string.

Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ComboBox
Asked by
Evgeniya
Top achievements
Rank 1
Answers by
Evgeniya
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or