Maintain Empty Message Value

2 posts, 1 answers
  1. Robert
    Robert  avatar
    68 posts
    Member since:
    Feb 2009

    Posted 17 Oct 2011 Link to this post

    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>
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Oct 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top