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

ComboBox doesn't display Selected Item

4 Answers 102 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 12 Nov 2014, 12:10 AM
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)
        {
 
        }
    }
}

4 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 12 Nov 2014, 12:13 AM
I've uploaded a wrong RadCombo2.jpg picture. Here is the correct one.
0
David
Top achievements
Rank 1
answered on 12 Nov 2014, 05:21 AM
I've done some further testing and it looks like a bug. When I remove DefaultItem from HTML markup it suddenly starts working.
0
David
Top achievements
Rank 1
answered on 13 Nov 2014, 08:58 PM
It was confirmed as a bug by Telerik support.

D.
0
Nencho
Telerik team
answered on 14 Nov 2014, 01:01 PM
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.

 
Tags
ComboBox
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or