RadAutoCompleteBox in RadGrid EditForm trick

2 posts, 0 answers
  1. Sypher
    Sypher avatar
    79 posts
    Member since:
    Aug 2006

    Posted 21 Sep 2012 Link to this post

    I've noticed that the .racInput box in the RACB (InputType=Token) is only 22px wide when it is displayed inside of a RadGrid edit form. This causes the control to seemingly not work when you click on it unless you click on the far left of the empty space. My fix for now is just to call the click on the .racInput whenever the parent .racTokenList is clicked. Here is all I had to add to the page using jQuery:

    $(document).on('click', '.racTokenList', function (e) { $(this).find('.racInput').click(); });

    Another way of fixing it would probably be to resize the .racInput on display of the .racTokenList... and I'm sure Telerik will eventually fix the issue in the built-in code, but this was a simple fix for me for now. This may also help in other cases where the RACB is not originally displayed on the page.

    Attached is what it looks like in our app using the WIndows7 theme. The .racInput is highlighted using the dev tools in Chrome.
  2. Ivana
    Ivana avatar
    657 posts

    Posted 26 Sep 2012 Link to this post

    Hi Bryan,

    Thank you for taking the time to inspect the RadAutoCompleteBox more closely.

    Yes indeed. Apart from the visualized box which holds the selected entries (tokens in this case), the input in which a user is allowed to type some text is small -- it has a very  small width set to it. This, however, should not cause any problems since when the user clicks on the tokens' holder area the focus goes to the input itself where the user is allowed to type right away.

    Would you let me know if this is not how RadAuotCompleteBox behaves at your end?

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top