ComboBox doesn't display Selected Item

5 posts, 0 answers
  1. David
    David avatar
    5 posts
    Member since:
    Nov 2013

    Posted 11 Nov 2014 Link to this post

    Hi,

    I've run into an issue when using RadComboBox on SharePoint 2013 application page. When I set the SelectedIndex property in code the combobox renders an empty item (see screenshots) but when the dropdown is opened I can see the item is actually selected.

    The SharePoint site wasn't customized and there are not JavaScript errors on the page. Also, this issue is not browser specific, I've tested it in different browsers.

    Telerik version: 2014.3.1024.45 

    HTML Markup:
    <telerik:RadComboBox runat="server" ID="radCombo">
        <DefaultItem Text="Select..." Value="-1"></DefaultItem>
    </telerik:RadComboBox>

    C# Code:
    public partial class TestPage : LayoutsPageBase
    {
        protected override void OnLoad(EventArgs e)
        {
            try
            {
                base.OnLoad(e);
     
                if (!Page.IsPostBack)
                {
                    radCombo.Items.Add(new RadComboBoxItem("Item 1", "Item 1"));
                    radCombo.Items.Add(new RadComboBoxItem("Item 2", "Item 2"));
     
                    radCombo.SelectedIndex = 1;
                }
            }
            catch (Exception exc)
            {
     
            }
        }
    }

  2. David
    David avatar
    5 posts
    Member since:
    Nov 2013

    Posted 11 Nov 2014 in reply to David Link to this post

    I've uploaded a wrong RadCombo2.jpg picture. Here is the correct one.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. David
    David avatar
    5 posts
    Member since:
    Nov 2013

    Posted 11 Nov 2014 in reply to David Link to this post

    I've done some further testing and it looks like a bug. When I remove DefaultItem from HTML markup it suddenly starts working.
  5. David
    David avatar
    5 posts
    Member since:
    Nov 2013

    Posted 13 Nov 2014 Link to this post

    It was confirmed as a bug by Telerik support.

    D.
  6. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 14 Nov 2014 Link to this post

    Hello,

    Indeed this is a bug, which is already forwarded to our developer team for further investigation.

    Regards,
    Nencho
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017