Open radCombo manually

8 posts, 0 answers
  1. Iosu Buenetxea
    Iosu Buenetxea avatar
    91 posts
    Member since:
    Jan 2008

    Posted 10 Oct 2008 Link to this post

    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.
  2. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 10 Oct 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Iosu Buenetxea
    Iosu Buenetxea avatar
    91 posts
    Member since:
    Jan 2008

    Posted 10 Oct 2008 Link to this post

    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.

  5. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 10 Oct 2008 Link to this post

    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.
  6. Iosu Buenetxea
    Iosu Buenetxea avatar
    91 posts
    Member since:
    Jan 2008

    Posted 10 Oct 2008 Link to this post

    Hello

    I want to select the text like when I click in text input area of RadCombobox and the text has been selected.
  7. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 13 Oct 2008 Link to this post

    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.
  8. Iosu Buenetxea
    Iosu Buenetxea avatar
    91 posts
    Member since:
    Jan 2008

    Posted 13 Oct 2008 Link to this post

    I want to select text with code.
     
    is it possible to do in javaScript after combo.focus();?
  9. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 13 Oct 2008 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017