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

Maintain Empty Message Value

1 Answer 25 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 17 Oct 2011, 05:07 PM
I'm writing to ask how best to maintain the Empty Message value in a RadComboBox - after the selection of a RadComboBoxItem;



<
telerik:RadComboBox ID="RadComboBox1" runat="server" Skin="Black"
                    AutoPostBack="True"
                    onselectedindexchanged="RadComboBox1_SelectedIndexChanged"
                    Font-Names="Microsoft Sans Serif" Width="160px"
                    EmptyMessage="Maines Paper" MarkFirstMatch="True">
                    <Items>                        
                        <telerik:RadComboBoxItem runat="server" Text="Sign out" Value="Sign out" />
                        <telerik:RadComboBoxItem runat="server" Text="Change Password" Value="Change Password" />
                    </Items>
                </telerik:RadComboBox>

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 1
answered on 18 Oct 2011, 04:42 AM
Hello Robert,

You can try the following javascript in OnClientSelectedIndexChanged event.

JS:
<script type="text/javascript">
function setEmpty()
{
    var combo = $find('<%= RadComboBox1.ClientID %>');
    combo.clearSelection();
    combo.set_emptyMessage("Maines Paper");
}
</script>

Thanks,
Princy.
Tags
ComboBox
Asked by
Robert
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or