Flashing cursor in Combo box

9 posts, 0 answers
  1. Daryl Baker
    Daryl Baker avatar
    1 posts
    Member since:
    Nov 2009

    Posted 27 Apr 2010 Link to this post

    I have a combo box when the pull down is active for the selection, there is a flashing 'I' curson in the input field which implies that you can type in there - which you cant. I have set the Selectable value to false which is meant to stop people being able to select the content of the combo box (the 'I' tool is used to do that), but it remains selectable.

    I have tried modifying the CSS to hide the cursor but that ofly affects the  mouse over.
    We are using Q42009.

    Any ideas.
    Doug
  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 29 Apr 2010 Link to this post

    Hi Daryl Baker,

    I am afraid that there is no option to remove the mouse cursor from the RadComboBox.
    Unfortunately the cursor cannot be controlled programmatically unless the RadComboBox is disabled.

    All the best,
    Kalina
    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. Vasssek
    Vasssek avatar
    190 posts
    Member since:
    Aug 2010

    Posted 23 Sep 2010 Link to this post

    Hello,

    I have the same problem. It would be nice, If there will be option to hide caret on focused dropdownbox.

    I've found something for silverlight and winforms. Please add it to PIT system to some next release of Ajax dlls...

    http://www.telerik.com/community/forums/silverlight/combobox/hide-the-caret.aspx
    http://www.telerik.com/community/forums/winforms/combobox-and-listbox/dropdownstyle-dropdownlist-still-shows-cursor.aspx

    Best regards  Vasssek
  4. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 24 Sep 2010 Link to this post

    Hi Vasssek,

    The caret in input fields is a browser-controlled feature, which is not affected by JavaScript and CSS. The only way to hide it is to the disable the input (then the browser hides the caret).

    Greetings,
    Simon
    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
  5. Vasssek
    Vasssek avatar
    190 posts
    Member since:
    Aug 2010

    Posted 24 Sep 2010 Link to this post

    Hi Simon,

    please take a look into attachments. One picture is Telerik dropdown and second is standard asp dropdown in which the caret isn't visible. However I still think that telerik dropdown should have option which could change it from dropdown to dropdownlist, then the cursor caret won't be visible.

    It's just an idea for programmers from telerik team how this control can imporove its behaviour...

    Have a nice day Vasssek
  6. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 24 Sep 2010 Link to this post

    Hello Vasssek,

    Thank you for sharing your thoughts on the whole matter.

    Actually we have considered adding an option to switch between RadComboBox and the standard DropDownList with a single property. Hopefully we will implement this feature in the near future.

    Kind regards,
    Simon
    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
  7. Cezar
    Cezar avatar
    15 posts
    Member since:
    Mar 2010

    Posted 29 Jun 2011 Link to this post

    Hey guys!

    Today I stepped onto the same problem, but good news! I found a solution after a couple of minutes.

    Telerik's admins said this was impossible, but as you can see below my solution is quite possible.

    :D

    Just add this to your ComboBox instance and you're done!

    instance.OnClientDropDownOpening = "function(sender, args){sender._inputDomElement.blur();}";
    instance.OnClientDropDownOpened = "function(sender, args){sender._inputDomElement.blur();}";
    instance.OnClientDropDownClosed = "function(sender, args){sender._inputDomElement.blur();}";
    instance.OnClientDropDownClosing = "function(sender, args){sender._inputDomElement.blur();}";

    I tested here and it works just fine.

    If you (like me) likes to inherit Telerik's classes so your coding would be better, your class implementation should look like this:
    public class MyComboBox : Telerik.Web.UI.RadComboBox
    {
        public MyComboBox()
        {
            this.OnClientDropDownOpening = "function(sender, args){sender._inputDomElement.blur();}";
            this.OnClientDropDownOpened = "function(sender, args){sender._inputDomElement.blur();}";
            this.OnClientDropDownClosed = "function(sender, args){sender._inputDomElement.blur();}";
            this.OnClientDropDownClosing = "function(sender, args){sender._inputDomElement.blur();}";
        }
    }

    I simply LOVE javascript! I always tell people, there's NOTHING that you CAN'T DO with javascript!
    Sometimes you don't know how to do it, but fortunately you CAN.

    Admins, please add this natively for us. The solution is so simple...

    Thanks everyone!

    EDIT: Another option would be to create a boolean property called HideTextCaret and when it is TRUE you set the properties I shared above.

    Cheers!
  8. Balasubramanian
    Balasubramanian avatar
    4 posts
    Member since:
    May 2011

    Posted 06 Jul 2011 Link to this post

    Thank you  cpimentel !

    I used them on the Radgrid pagesize combobox. It worked fine. Thank you. 
  9. Cezar
    Cezar avatar
    15 posts
    Member since:
    Mar 2010

    Posted 06 Jul 2011 Link to this post

    My pleasure dude!

    :D

    Cheers!
Back to Top