Focus lost on asyncronous data binding

2 posts, 0 answers
  1. Ovidiu
    Ovidiu avatar
    7 posts
    Member since:
    Mar 2013

    Posted 21 Oct 2013 Link to this post


    We encounter the following issue,
    - a form with many combobox-es each of them will load its items using ajax from the server using ServerFiltering (true)
    - sometime obtaining the filtered items takes a bit, and our users just go ahead and start to fill in the next combobox in the form.
    - problem is that at some point the previous combo async operation completes and the dropdown of previous combobox will open and the focus is shifted back to the previous control

    The behavior we consider appropriate here would be that the previous combo handles silently the end of async operation if it is no longer focused control on the form.
    Can this behavior achieved somehow with current version.

    As a side note there was something similar with TabStrip control where asynchronous tab contents were stacked as the asynchronous operation completed, I see now that this was solved in the last internal build (2013.2.1015) perhaps you can consider a similar fix for the combo async behavior explained above.

  2. Alexander Popov
    Alexander Popov avatar
    1411 posts

    Posted 23 Oct 2013 Link to this post

    Hello Ovidiu,

    I am afraid that currently there is no built-in solution for changing this behavior, however you could do the following:  
    1. Use the ComboBoxes' open event to set store the ID of the last opened ComboBox
    2. Attach a handler to the close event and check if the ID of the last ComboBox is different from the current
    3. In case the IDs do not match use the preventDefault method
    Here is an example:  
    var lastComboBox = null;  
        close: function(e){
            if (lastComboBox != 1) {
        open: function () {
            lastComboBox = 1;
        close: function(e){
            if (lastComboBox != 2) {
        open: function () {
            lastComboBox = 2;


    Alexander Popov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top