Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1145
Set the filterDialog position
posted

I would like to be able to open the advanced filtering dialog in the same position that it was last closed in.

I have managed to save the previous offset and reinstate it in the filterDialogOpened event handler but you can see the dialog "jump" from its default centered position.

Setting the offset in the filterDialogOpening doesn't work, looks like it is being overwritten later in the opening process.

Any suggestions welcome.

Aidan

  • 15320
    Suggested Answer
    Offline posted

    Hello Aidan,

    Setting the offset in the filterDialogOpening event does not work, because the filter dialog is not fully rendered at this point. However still you can use this event to change the initial position of the filter dialog on a subsequent opening using setTimeout() function, for instance:

    filterDialogOpening: function (evt, ui) {
      if(movedDialogPos){
        setTimeout(
          function()
     {
              return $("#grid_container_dialog").offset({top: movedDialogPos.top, left: movedDialogPos.left});
     }
        ,100);
      }
     
    }

    I'm attaching a sample with similar scenario for your reference.

    If you need further assistance, please let me know.

    Regards,

    Tsanna

    filteringDialogPersistOffset.zip