Disable blinking cursor

12 posts, 0 answers
  1. Dirk Eberhardt
    Dirk Eberhardt avatar
    18 posts
    Member since:
    Jul 2009

    Posted 19 Oct 2009 Link to this post

    Good morning,
    is there a way to disable the blinking cursor at the end of the ComboBox select Box?

    See attached a example image.

    Thanks in advance.

    Regards
    Dirk
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 19 Oct 2009 Link to this post

    Hello Dirk,

    I hope you do not want to allow typing into your combobox input. If so, inorder to remove the cursor from the input box of the RadComboBox, make sure that the AllowCustomText and MarkFirstMatch properties of the combobox are set to false.

    Thanks
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dirk Eberhardt
    Dirk Eberhardt avatar
    18 posts
    Member since:
    Jul 2009

    Posted 19 Oct 2009 Link to this post

    Hi,
    i set both properties to "false", but the cursor is still there?

    This is the code of my ComboBox:

    <telerik:RadComboBox ID="CategoryGroup" AllowCustomText="false" MarkFirstMatch="false" runat="server" DataValueField="GROUP_CODE" DataTextField="DESCRIPTION" AutoPostBack="true" OnSelectedIndexChanged="CategoryGroup_SelectedIndexChanged" Width="100%"
    </telerik:RadComboBox> 

    Any other ideas?

    Regards
    Dirk
  5. Dirk Eberhardt
    Dirk Eberhardt avatar
    18 posts
    Member since:
    Jul 2009

    Posted 21 Oct 2009 Link to this post

    No idea?
  6. jon *
    jon * avatar
    5 posts
    Member since:
    Sep 2009

    Posted 10 Dec 2009 Link to this post

    Hello,

    I have the same problem, have you resolved it?

    If yes, can you tell me the solution?

    Thank you.
  7. Dirk Eberhardt
    Dirk Eberhardt avatar
    18 posts
    Member since:
    Jul 2009

    Posted 10 Dec 2009 Link to this post

    Hi,
    no I found no solution. It's still there.
  8. Cezar
    Cezar avatar
    15 posts
    Member since:
    Mar 2010

    Posted 29 Jun 2011 Link to this post

    Hi everyone!

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

    Telerik personel said that was IMPOSSIBLE on another thread! I say different!

    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.

    Thanks everyone!
  9. Tony
    Tony avatar
    10 posts
    Member since:
    Apr 2011

    Posted 19 Sep 2011 Link to this post

    This fix does not appear to (FULLY) work.  If you expand the combobox and then click back in the textbox portion of it, the cursor will appear.
  10. Cezar
    Cezar avatar
    15 posts
    Member since:
    Mar 2010

    Posted 19 Sep 2011 Link to this post

    Not for me.
    Here this sample is working just fine.

    Which browser are you using and which version?

    Thanks!
  11. Tony
    Tony avatar
    10 posts
    Member since:
    Apr 2011

    Posted 19 Sep 2011 Link to this post

    I'm using IE9, latest (9/15/11) Telerik version.  Basically the steps to reproduce are this:

    1) You expand the dropdown portion.  This causes the client side Opening and Opened events to fire, which blur away the cursor.
    2) With the dropdown still opened, click in the textbox portion of the combobox.  (The dropdown doesn't automatically close in this case). The cursor appears, which seems expected becasue it will not be blurred again until the closing/closed events fire.
  12. Munna
    Munna avatar
    3 posts
    Member since:
    Apr 2012

    Posted 20 Jun 2012 Link to this post

    function DisableCursorInCombo() {
            var combo = $find("--Your Combo Box Id--");
            var input = combo.get_inputDomElement();
            input.disabled = "disabled";
        }

    Use the above mentioned script onclientload event in your combo box. 
  13. RANI
    RANI avatar
    1 posts
    Member since:
    Sep 2015

    Posted 03 Sep 2015 in reply to Munna Link to this post

    Hi Munna, 

    I used ur method with some change OnClientDropDownClosed="DisableCursorInCombo"

    function DisableCursorInCombo() {
           var combo = $find('<%= rcbDynamicContentSegements.ClientID %>');
           var input = combo.get_inputDomElement();
           input.blur()
       }​

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