"Show all results" event

6 posts, 1 answers
  1. Petr
    Petr avatar
    25 posts
    Member since:
    Jul 2015

    Posted 25 Nov 2016 Link to this post

    Dear all,

    I implement function which open the list after click in the control:

    var $ = $telerik.$;
    function pageLoad() {
        $(".racTokenList").on("click", function (e) {
            var controlId = this.parentElement.id;
            var autoComplete = $find(controlId);
            autoComplete.query(" ");
        })
    }

     

    But there is a problem with "Show All Results" button. If I click on it, it gets the value from control which is empty nothing is shown. Is there any event when user invoke this function?

    I don't want to put empty space in input field, because if user start typing then it will include the space.

    Thank you for any ideas,

    Petr

  2. Petr
    Petr avatar
    25 posts
    Member since:
    Jul 2015

    Posted 28 Nov 2016 in reply to Petr Link to this post

    In the meantime I found the solution. I put space in input and select it. So button works fine and if user start typing it removes this blank character. The only problem is that after button is pressed, the selection is gone. If user types anything space is there and it is not filtered correctly, but I can live with it. My new code is:

    function pageLoad() {
                $telerik.$(".racTokenList").on("click", function (e) {
                    var controlId = this.parentElement.id;
                    var autoComplete = $find(controlId);
                    autoComplete.get_inputElement().value = " ";
                    autoComplete.get_inputElement().select();
                    autoComplete.query(" ");
                })

     

    The other problem I have is problem with drop down list. I use this control in edit dialog for RadGrid. But if I open drop down list and move the dialog then list stays on the same position. After closing dialog it is still visible. I think that correct behaviour is like combobox so list is closed after moving or hidding parent input. Is there any property for it?

    Thanks,

    Petr

  3. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1251 posts

    Posted 28 Nov 2016 Link to this post

    Hello Petr,

    We are glad you have found a way to customize the behavior of the AutoCompleteBox. As for the the issue with the dropdown remaining open I checked the behavior of the RadComboBox and RadDropDownList in the Grid's popup editor in version 2016.3.1027 and their dropdowns close immediately after clicking anywhere on the window, so for example clicking on the window's header in order to drag it or clicking on its close button removes the focus from the RadComboBox or RadDropDownList and the dropdown closes automatically. This is their behavior by design.
    Please, check which particular control you are using, whether it is a RadDropDownList, RadComboBox, asp:DropDownList, etc. and open a new thread about the issue you are experiencing with product RadGrid in case the behavior is specifically related to using the control in RadGrid, providing as much details as possible on your scenario and controls configuration. It would be helpful if you could isolate the issue in a sample project as explained in our blog post, as this would help us with reproducing it.
    We try to keep the threads consistent with their original subject. This makes them more maintainable, easier to track and facilitates finding the relevant information they contain. 

    Regards,
    Ivan Danchev
    Telerik by Progress
    Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
  4. Petr
    Petr avatar
    25 posts
    Member since:
    Jul 2015

    Posted 28 Nov 2016 in reply to Ivan Danchev Link to this post

    Hello Ivan,

    Sorry for misunderstanding. The problem I have is with a list of matched results for RadAutoCompleteBox.There is general problem with resizing I think. I made simple page with RadAutoCompleteBox, type any text which open the list and resize the page. After that the list of results is not aligned with input box. In dialog you can move the dialog and position of list doesn't change and you can also close and it is still visible.

    Unfortunately I was not able to find any event of RadAutoCompleteBox which is invoked when dialog is closing.

    Regards,

    Petr

  5. Answer
    Ivan Danchev
    Admin
    Ivan Danchev avatar
    1251 posts

    Posted 30 Nov 2016 Link to this post

    Hello Petr,

    We noticed that the AutoCompleBox' dropdown behaves differently than the ComboBox and DropDownList's ones when the control is nested in a RadWindow or in the Grid's Edit window. On clicking the window to move it: the AutoCompleBox dropdown does not close automatically (video). Is this the behavior you are experiencing? As for the dropdown remaining open when closing the dialog window, does your scenario involve a postback occurring when closing the dialog? If so are there any js exceptions thrown when closing it? 

    Regards,
    Ivan Danchev
    Telerik by Progress
    Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
  6. Petr
    Petr avatar
    25 posts
    Member since:
    Jul 2015

    Posted 30 Nov 2016 in reply to Ivan Danchev Link to this post

    Ivan,

    Yes, it is exactly what I noticed. Yes, you are right postback solve my problem.

    Thank you for your help,

    Petr

Back to Top