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

RadComboBox Text Property

6 Answers 426 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Igor
Top achievements
Rank 1
Igor asked on 04 Apr 2011, 05:47 PM
Hello guys,

I have problem that only happens in IE 9.  The text property of ComboBox always returns empty value.

<asp:UpdatePanel ID="RecurrenceType" runat="server" UpdateMode="Conditional">
       <Triggers>           
           <asp:PostBackTrigger ControlID="rcbName" />          
       </Triggers>
       <ContentTemplate>
           <table class="style1">              
               <tr>
                   <td class="style4">
                       Name:
                   </td>
                   <td class="style3">
                       <telerik:RadComboBox ID="rcbName" runat="server" Width="406px" Height="125px"
                                    EmptyMessage="Type media item name" AllowCustomText="true" MarkFirstMatch="true" Sort="Ascending">
                       </telerik:RadComboBox>
                   </td>
               </tr>
           </table>
       </ContentTemplate>
   </asp:UpdatePanel>

Any help would be appreciated.

- Igor 

6 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 07 Apr 2011, 03:21 PM
Hello Igor,

I've tested your scenario and the Text property is working as expected as you could see on this clip here.

Could you be more specific when exactly you are trying to get the Text of the RadComboBox?

Greetings,
Dimitar Terziev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jason Green
Top achievements
Rank 2
answered on 22 Aug 2011, 05:46 PM
Did you ever have anyone else having an issue here?  I have a radcombo box in a user control (in sitefinity) and only in IE9 the .text value is empty.

<telerik:RadComboBox
    ID="rcbDynamicText"
    Height="200px"
    Width="260px"
    EnableAutomaticLoadOnDemand="True"
    OnClientItemsRequesting="SearchBoxRequestingHandler"
    OnClientKeyPressing="SearchBoxEnterHandler"
    OnSelectedIndexChanged="rcbDynamicText_SelectedIndexChanged"
    AutoPostBack="true"
    Filter="Contains"
    ItemsPerRequest="10"
    ShowMoreResultsBox="True"
    EnableVirtualScrolling="True"
    DataValueField="Name"
    DataTextField="Name"
    DataSourceID="LDSTPII"
    LoadingMessage="Searching Performers..."
    runat="server" />
0
Jason Green
Top achievements
Rank 2
answered on 22 Aug 2011, 06:30 PM
I was able to reproduce the issue.  It comes from allowing custom text, and using a submit button on the page instead of just the index change event.  Here is an example user control that works everywhere except in IE9:

<%@ Control Language="C#" ClassName="RadComboTest" %>
 
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        rcbExample.Items.Add(new RadComboBoxItem("Example One"));
        rcbExample.Items.Add(new RadComboBoxItem("Example Two"));
        rcbExample.Items.Add(new RadComboBoxItem("Example Three"));
        rcbExample.Items.Add(new RadComboBoxItem("Example Four"));
        rcbExample.Items.Add(new RadComboBoxItem("Example Five"));
    }
     
    protected void rcbExample_SelectedIndexChanged(object Sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        lblValue.Text = rcbExample.Text;
    }
 
    protected void cmdTest_Click(object sender, EventArgs e)
    {
        lblValue.Text = rcbExample.Text;
    }
</script>
 
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script language="javascript" type="text/javascript">
        function TestBoxEnterHandler(sender, e) {
            if (e.get_domEvent().keyCode == 13) {
                document.getElementById('<%= cmdTest.ClientID %>').click();
                return false;
            }
        }
 
        function TestBoxRequestingHandler(sender, eventArgs) {
            if (sender.get_text().length < 3) {
                eventArgs.set_cancel(true);
            }
        }
    </script>
</telerik:RadScriptBlock>
<telerik:RadComboBox ID="rcbExample"
    Height="200px"
    Width="260px"
    AllowCustomText="true"
    OnClientKeyPressing="TestBoxEnterHandler"
    OnSelectedIndexChanged="rcbExample_SelectedIndexChanged"
    AutoPostBack="true"
    Filter="Contains"
    ItemsPerRequest="10"
    runat="server" />
<asp:Button ID="cmdTest" runat="server" Text="Submit" onclick="cmdTest_Click" /><br />
 
<asp:Label ID="lblValue" runat="server" />


Is there a workaround?  How do I fix it?
0
Dimitar Terziev
Telerik team
answered on 25 Aug 2011, 03:16 PM
Hello Jason,

I've tested the sample code you have provided, but the Text property is working properly on my side. Could you clarify which version of the controls you are using?

Please refer to the following video showing the behavior on my side.

In case you continue to experience the issue, open a support ticket and provide us with a runnable sample page with the issue being reproduced so we could examine it locally.

All the best,
Dimitar Terziev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Jason Green
Top achievements
Rank 2
answered on 25 Aug 2011, 10:04 PM
Hello Dimitar,

I actually received another message back that showed the versions it was an bug in:

     Hello Jason,

     Thank you for contacting us.

     There has been a problem with the version of the controls that you are using (2010.1.1317) in IE9,
     which has already being fixed in the 2011.1.315 version. I've tested your sample user control with
     the 2011.1.315 version and it was working properly on my side.

     Please try to upgrade if possible.

I am giving that a try this afternoon.

0
Dimitar Terziev
Telerik team
answered on 30 Aug 2011, 12:26 PM
Hi Jason,

Please inform me, if the problem still exists with the latest version of the controls.

Greetings,
Dimitar Terziev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
ComboBox
Asked by
Igor
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Jason Green
Top achievements
Rank 2
Share this question
or