RadComboBox Text Property

7 posts, 0 answers
  1. Igor
    Igor avatar
    12 posts
    Member since:
    Dec 2010

    Posted 04 Apr 2011 Link to this post

    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 

  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 07 Apr 2011 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jason Green
    Jason Green avatar
    4 posts
    Member since:
    Sep 2009

    Posted 22 Aug 2011 Link to this post

    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" />
  5. Jason Green
    Jason Green avatar
    4 posts
    Member since:
    Sep 2009

    Posted 22 Aug 2011 Link to this post

    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?
  6. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 25 Aug 2011 Link to this post

    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 >>

  7. Jason Green
    Jason Green avatar
    4 posts
    Member since:
    Sep 2009

    Posted 25 Aug 2011 Link to this post

    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.

  8. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 30 Aug 2011 Link to this post

    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 >>

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