Author Topic: PQGrid is interfering with jQ.ui dialog  (Read 2428 times)

akraines

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 34
    • View Profile
PQGrid is interfering with jQ.ui dialog
« on: August 05, 2019, 07:10:46 pm »
Hi,

When I call $(...).dialog in the page where pqgrid is loaded, it is not showing the dialog buttons. The same code works on every other page of our program.
Our project is using jQuery UI - v1.11.4 and I see that your project is using v1.12.1 However, updating in out project didn't help (and actually broke other things since they need to be migrated. - however the modal did work on other pages even after updating the library to be 1.12.1, so it seems that it isn't based on a dependancy issue.)
1. Working (rest of project)
2. Not working


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: PQGrid is interfering with jQ.ui dialog
« Reply #1 on: August 05, 2019, 07:21:29 pm »
The demos use v1.11.4 and there is no such issue.

Ex: https://paramquery.com/pro/demos/fluid_popup displays the dialog buttons fine.

Could you please share a jsfiddle of the issue.

akraines

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: PQGrid is interfering with jQ.ui dialog
« Reply #2 on: August 20, 2019, 07:32:56 pm »
Here was my solution:
    //Define buttons after initialization to solve the "disappearing buttons" issue. See https://stackoverflow.com/a/11898975/5683904
    $dialog.dialog("option","buttons", {Refresh: function () {
        resetAreYouSure("form");
        window.location = `/Account/SignIn?redirectUrl=${encodeURIComponent(window.location)}`;
    }})

Still not sure why this happened.