Prevent callback to data sourse on focus lost

3 posts, 0 answers
  1. Cedric
    Cedric avatar
    3 posts
    Member since:
    Mar 2015

    Posted 14 Apr 2015 Link to this post

    HI Telerik team.

    I'm using an autocomplete component for filtering rows in a grid (on server side).

    I've noticed that the component calls the server to bind to the datasource when it lost the focus, that is to say that the grid is filtered twice with the same value( when you type the last char and when the autocomplete lost its focus).

    Is there a way to prevent this ?

     Thanks for your answer.

    Regards,

       Cédric
  2. Cedric
    Cedric avatar
    3 posts
    Member since:
    Mar 2015

    Posted 14 Apr 2015 in reply to Cedric Link to this post

    Forget my first question cause I'm not using the autocomplete control the way I'm supposed to do.

    In fact, I would like to have an filter that acts this way:

     - A textbox with delay and minLength properties like the autocomplete control (in fact, an autocomplete without dropdown list).

     - When the user stops typing or press the tab or the enter key, act like when you select a value in the autocomplete control (reload the grid with all its filters)

     I'm near the goal passing an empty datasource to the autocomplete but I must press tab or enter key to refresh the grid and I don't find the way to refresh the grid when the user stops typing.

     Thanks for your help,

     Regards,

      Cédric
  3. Kendo UI is VS 2017 Ready
  4. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 16 Apr 2015 Link to this post

    Hello Cedric,

    I believe that the best way will be to build a custom widget that wires the DataSource component to an input element. Thus you will be able to wire the change event of the input and filter the source manually.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top