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

Open radCombo manually

7 Answers 332 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Iosu Buenetxea
Top achievements
Rank 1
Iosu Buenetxea asked on 10 Oct 2008, 08:42 AM
Hello

I use my RadCombo to show some clients, the user can type the code for the client, if this code doesn't exist I want to open the radCombo items to force the users to select one.

Can I show RadCombo items manually?

Regards.

7 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 10 Oct 2008, 10:13 AM
Hi ,

You can call the showDropDown() client side method of RadComboBox.

If you call the showDropDown/toggleDropDown method on a button click, you will have to use combo.set_closeDropDownOnBlur(false) right before you call the showDropDown/toggleDropDown  method as otherwise the dropdown area will flicker instead of open.
Then, you should use combo.set_closeDropDownOnBlur(true) in the OnClientBlur event handler. A live example can be seen at: Add/Remove/Disable Items

More about client side of RadComboBox you can find here.


All the best,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Iosu Buenetxea
Top achievements
Rank 1
answered on 10 Oct 2008, 01:36 PM
Hello Rosi,

With ShowDropDown I have solved this issue, but I have another question.

How can I select the text that the user has typed in radCombo?

Thanks.

0
Rosi
Telerik team
answered on 10 Oct 2008, 02:17 PM
Hi,

Could you provide more details about what you try to achieve? Do you want to select the text with a mouse or get the value entered by the user. You can get the text with get_text() client side method of RadComboBox.


All the best,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Iosu Buenetxea
Top achievements
Rank 1
answered on 10 Oct 2008, 02:27 PM
Hello

I want to select the text like when I click in text input area of RadCombobox and the text has been selected.
0
Rosi
Telerik team
answered on 13 Oct 2008, 08:12 AM
Hello ,

When you click in the input the whole text in the input will be automatically selected. This is the default behavior of the control.

You can disable this option by setting the EnableTextSelection property of RadCombobox. Then you can select the part of the text which you want by using the mouse.


Regards,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Iosu Buenetxea
Top achievements
Rank 1
answered on 13 Oct 2008, 08:36 AM
I want to select text with code.
 
is it possible to do in javaScript after combo.focus();?
0
Rosi
Telerik team
answered on 13 Oct 2008, 12:34 PM
Hello ,

Please try the following:

1. Set the EnableTextSelection property of RadCombobox.
2. Hook on the OnClientFocus event of RadComboBox.
3. Execute the following javascript in its event handler : combo.selectText(1,2);

This will select the second letter in RadComboBox 's text.

Regards,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Iosu Buenetxea
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Iosu Buenetxea
Top achievements
Rank 1
Share this question
or