dropdown only responds to mouse click where there is text

12 posts, 1 answers
  1. Kieran
    Kieran avatar
    23 posts
    Member since:
    Feb 2009

    Posted 23 Nov 2009 Link to this post

    Hi

    A combo box dropdown has a set width. In most cases the text is less to then the full width of the dropdown. However the items in the dropdown only respond to mouse clicks (ie to be selected) when the mouse is clicked on text. If the mouse is clicked somewhere on the dropdown that doesn't contain text the click is not picked up

    Any ideas?
    Thanks
  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 24 Nov 2009 Link to this post

    Hi Kieran,

    We tried to reproduce the reported issue using the code below, but to no avail. Let us know what's different in your case.

    <telerik:RadComboBox ID="RadComboBox1" runat="server" DropDownWidth="450px">
           <Items>
               <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="RadComboBoxItem1" />
               <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="RadComboBoxItem2" />
               <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" Value="RadComboBoxItem3" />
               <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem4" Value="RadComboBoxItem4" />
               <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem5" Value="RadComboBoxItem5" />
               <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem6" Value="RadComboBoxItem6" />
           </Items>
       </telerik:RadComboBox>


    Kind regards,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Attila Gál
    Attila Gál avatar
    4 posts
    Member since:
    Oct 2009

    Posted 24 Nov 2009 Link to this post

    Hi,

    I have the same issue!
    The strange, that some of my combos are working well, some of them are not, BUT they are instantiated and populated in the same way!
    Now I'm trying to make the simplest reproduction of the issue, Paul's snippet is working well for me.
  4. Kieran
    Kieran avatar
    23 posts
    Member since:
    Feb 2009

    Posted 24 Nov 2009 Link to this post

    Hi

    The combo boxes are populated using a form of the following code. This demonstrates quite clearly the problem as once mouse isn't over text there is no response from the combo box. the sample you supplied works fine

    Hope this is of some assistance

    function AddNewItem(combo, id, text) {
        var comboItem = new Telerik.Web.UI.RadComboBoxItem();
        comboItem.set_text(Text);
        comboItem.set_value(id);
        combo.trackChanges();
        combo.get_items().add(comboItem);
        combo.commitChanges();
    }
    function SetItems() {
        var combo = $find("RadComboBox1");
        var st = "Code";
        AddNewItem(combo, "1", "");
        for (var i = 0; i < 20; i++) {
            st = st + i + "Code";
            AddNewItem(combo, i, st);
        }
    }
  5. Kieran
    Kieran avatar
    23 posts
    Member since:
    Feb 2009

    Posted 26 Nov 2009 Link to this post

    Hi Folks

    Any update on this?
  6. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 27 Nov 2009 Link to this post

    Hello Kieran,

    This happens because the text of the Items is one long word.

    Please consider breaking it into smaller words with space between them to allow the browser to automatically wrap the text.

    Sincerely yours,
    Simon
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Adam Lindsay
    Adam Lindsay avatar
    21 posts
    Member since:
    Oct 2009

    Posted 30 Nov 2009 Link to this post

    I am having this same issue.  The text of my combo box has spaces and is not continuous text.  I am populating the combo box with the following code:

    cbxDefaultSiteId.DataSource = siteList;

    cbxDefaultSiteId.DataTextField =

    "Description";

     

    cbxDefaultSiteId.DataValueField =

    "SiteNumber";

     

    cbxDefaultSiteId.DataBind();

    siteList contains a list of objects where SiteNumber is a string similar to "001" and Description is "001-Test Site"

    Thoughts?

  8. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 01 Dec 2009 Link to this post

    Hi Adam Lindsay,

    Are you referring to the same issue? Could you please provide a screenshot showing the issue?

    Best wishes,
    Simon
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. Kieran
    Kieran avatar
    23 posts
    Member since:
    Feb 2009

    Posted 07 Jan 2010 Link to this post

    Hi

    Back again to this issue.
    I have expanded the javascript function as below

    function AddNewItem(combo, id, text) {
        var comboItem = new Telerik.Web.UI.RadComboBoxItem();
        comboItem.set_text(Text);
        comboItem.set_value(id);
        combo.trackChanges();
        combo.get_items().add(comboItem);
        combo.commitChanges();
    }
    function SetItems() {
        var combo = $find("RadComboBox1");
        var st = "Code";
        AddNewItem(combo, "1", "");
        AddNewItem(combo, "a", "London Tower");
        AddNewItem(combo, "b", "London Tower is");
       AddNewItem(combo, "c", "London Tower is falling down");
       AddNewItem(combo, "d", "London Tower is");


    AddNewItem(combo, "1", "");
         for (var i = 0; i < 20; i++) {
            st = st + i + "Code";
            AddNewItem(combo, i, st);
        }


    This example can be set up by adding a radcombobox to a web page and calling the function follows
    <body onload="SetItems()">. Set the combo box width to 500 to really see this effect.

    Once this is done run the page and drop down the combo box. You will notice that there is not response in the combo box unless the mouse is actually over a bit of the word or sentence. If the text is not as long as the box is wide there is white space there that does not respond to the mouse - ie the current hovered over rowm is not highlighted until the mouse goes over the text. This also makes it impossibe to select the first blank entry row.

    If you actually try this this should become obvious immediately

    Any ideas?

    Kieran


  10. Answer
    Simon
    Admin
    Simon avatar
    2281 posts

    Posted 08 Jan 2010 Link to this post

    Hello Kieran,

    Thank you for the clarifications.

    This has been an issue with the Skins for some time and we fixed it in recent versions of Telerik.Web.UI. Please download the latest and upgrade.

    Regards,
    Simon
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  11. Techmonster13
    Techmonster13 avatar
    1 posts
    Member since:
    Jun 2011

    Posted 17 Jul 2012 Link to this post

    Hi There,

    We are having similar issue at our end. Even after upgrading to latest Skin, unless we click on the actual text in the dropdown, the option is not selected. Although the mouse over colour change is visible on the text as well as on the whitespace, clicking on the whitespace collapses the combobox and shows the selected text (confusing users to be selected) but when you expand the combobox the option is not selected (checked).

    Refer the attached screenshots where a value although appears selected is not actually selected.

    Thank you in advance...
  12. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 19 Jul 2012 Link to this post

    Hi,

    Could you open a support ticket and provide a sample reproducing the issue so we could verify whether the bug mentioned earlier in this thread still exists or the experienced problem is caused by a new one?

    Regards,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top