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

Flashing cursor in Combo box

8 Answers 136 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Daryl Baker
Top achievements
Rank 1
Daryl Baker asked on 27 Apr 2010, 10:03 AM
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

8 Answers, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 29 Apr 2010, 04:15 PM
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.
0
Vasssek
Top achievements
Rank 1
answered on 23 Sep 2010, 08:14 PM
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
0
Simon
Telerik team
answered on 24 Sep 2010, 08:54 AM
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
0
Vasssek
Top achievements
Rank 1
answered on 24 Sep 2010, 09:16 AM
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
0
Simon
Telerik team
answered on 24 Sep 2010, 04:40 PM
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
0
Cezar
Top achievements
Rank 1
answered on 29 Jun 2011, 07:57 AM
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!
0
Balasubramanian
Top achievements
Rank 1
answered on 06 Jul 2011, 08:55 PM
Thank you  cpimentel !

I used them on the Radgrid pagesize combobox. It worked fine. Thank you. 
0
Cezar
Top achievements
Rank 1
answered on 06 Jul 2011, 09:40 PM
My pleasure dude!

:D

Cheers!
Tags
ComboBox
Asked by
Daryl Baker
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Vasssek
Top achievements
Rank 1
Simon
Telerik team
Cezar
Top achievements
Rank 1
Balasubramanian
Top achievements
Rank 1
Share this question
or