I've got a combobox in a toolbar and I'm trying to change the empty text in JS. The evidence suggests that the change is being applied but the empty message text that is displayed doesn't change.
Here's how the control is set up ...
The JS looks like this ...
When called the alert message reads as I would expect, but the empty message displayed remains unchanged.
FWIW, I'm using Q3 2009.
--
Stuart
Here's how the control is set up ...
<telerik:RadToolBar ID="RadToolBar1" runat="server" |
Skin="Office2007" Style="width: 100%"> |
<Items> |
<telerik:RadToolBarButton Value="btnSkills"> |
<ItemTemplate> |
<telerik:RadComboBox ID="cboContactSkill" Runat="server" MaxHeight="200px" |
EmptyMessage="Select skill(s)" |
OnClientDropDownClosed="SkillsDropDownClosed" |
Skin="WebBlue"> |
<ItemTemplate> |
<div id="div2"> |
<telerik:RadTreeView ID="tvContactSkill" runat="server" |
CheckBoxes="true" |
DataFieldID="SkillId" |
DataTextField="Name" |
DataValueField="SkillId" |
Skin="WebBlue"> |
</telerik:RadTreeView> |
</div> |
</ItemTemplate> |
<Items> |
<telerik:RadComboBoxItem Text="" /> |
</Items> |
</telerik:RadComboBox> |
</ItemTemplate> |
</telerik:RadToolBarButton> |
</Items> |
</telerik:RadToolBar> |
The JS looks like this ...
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> |
<script type="text/javascript"> |
function SkillsDropDownClosed(sender, e) { |
var cbo = sender; |
var tv = sender.get_items().getItem(0).findControl("tvContactSkill"); |
cbo.trackChanges(); |
var selectedNodes = tv.get_checkedNodes(); |
if (selectedNodes == null || selectedNodes.length == 0) { |
cbo.set_emptyMessage("None"); |
} else if (selectedNodes.length == 1) { |
cbo.set_emptyMessage(selectedNodes[0].get_text()); |
} else { |
cbo.set_emptyMessage("[multiple (" + selectedNodes.length + ")]"); |
} |
cbo.commitChanges(); |
alert(cbo.get_emptyMessage()); |
cbo.hideDropDown(); |
} |
</script> |
</telerik:RadScriptBlock> |
When called the alert message reads as I would expect, but the empty message displayed remains unchanged.
FWIW, I'm using Q3 2009.
--
Stuart