SelectedIndex -1 is ignored

2 posts, 0 answers
  1. Deepak Vasudevan
    Deepak Vasudevan avatar
    82 posts
    Member since:
    May 2010

    Posted 15 Nov 2011 Link to this post

    I am trying to set SelectedIndex -1 with the objective that I don't any item in the RadCombo to be highlighted. Whilst the debugger passes the line the next statement says SelectedIndex 0.

    How to make the RadCombo not to select any particular item automatically?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 16 Nov 2011 Link to this post


    To avoid automatic selection of RadComboBox you can try any of the following approaches.

    1) Set EmptyMessage property.

    2) Add an empty text as first RadComboBoxItem. Here is the sample ASPX.

    <telerik:RadComboBox ID="RadComboBox1" runat="server"
                AutoPostBack="true"  Skin="Sunset" EnableAjaxSkinRendering="false"  >
                <telerik:RadComboBoxItem Text="" Value="-1" />
                <telerik:RadComboBoxItem Text="WNEN" Value="WNEN"  >
                <telerik:RadComboBoxItem Text="WNES" Value="WNES">
                <telerik:RadComboBoxItem Text="GBRN" Value="GBRN">
                <telerik:RadComboBoxItem Text="GBRS" Value="GBRS">

Back to Top