Author Topic: Issue to load data in grid for inactive tabs  (Read 577 times)

pranit@srcomsec

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 99
    • View Profile
Issue to load data in grid for inactive tabs
« on: November 08, 2022, 08:33:13 pm »
We are using Goldlayout for docking to display data in different tabs.

The data will be loaded to the visible tabs but not to the invisible tab.

If we open the invisible tab & run the below javascript then the data shows on the grid.
$("#grid div id").pqGrid('refresh')

Please refer to the attached screenshot and advise.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Issue to load data in grid for inactive tabs
« Reply #1 on: November 09, 2022, 06:29:05 am »
Quote
If we open the invisible tab & run the below javascript then the data shows on the grid.
$("#grid div id").pqGrid('refresh')

That's working as expected, so there's no issue. Have I missed something?

pranit@srcomsec

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 99
    • View Profile
Re: Issue to load data in grid for inactive tabs
« Reply #2 on: November 09, 2022, 11:43:35 am »
Thank you for your quick response.

I would like to load data in all grids without calling the below javascript like other active tab grids.
$("#grid div id").pqGrid('refresh')

As shown in image 1, the data is not loaded by default. As shown in image 2 data is loaded after calling the above javascript in the console. Our aim is to load data in all tabs by default without calling javascript.

Let me know if you have any suggestions to load data in all tabs without calling javascript.
« Last Edit: November 09, 2022, 12:41:07 pm by pranit0405 »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Issue to load data in grid for inactive tabs
« Reply #3 on: November 09, 2022, 09:37:28 pm »
Currently it's a requirement to call refresh on the grid whenever its visibility state changes from hidden to visible.

pranit@srcomsec

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 99
    • View Profile
Re: Issue to load data in grid for inactive tabs
« Reply #4 on: November 10, 2022, 07:31:57 pm »
Ohkay Noted. Thanks

pranit@srcomsec

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 99
    • View Profile
Re: Issue to load data in grid for inactive tabs
« Reply #5 on: November 14, 2022, 10:02:17 am »
Hi, can we please look into this feature as a suggesstion feature, as it is very imporant for users like me, who are using paramquery in a tabbed docking layout (Golden Layout).

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Issue to load data in grid for inactive tabs
« Reply #6 on: November 14, 2022, 10:53:39 am »
Ok, I would look into it but may I know why don't you want or can't call refresh method of the grid.

pranit@srcomsec

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 99
    • View Profile
Re: Issue to load data in grid for inactive tabs
« Reply #7 on: November 14, 2022, 12:16:27 pm »
We tried calling refresh grid every second, but while doing so we were not able to access the header filter of the grid.

As the user beings to type anything in the filter, the text is refreshed every second making it inaccessable for the user.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Issue to load data in grid for inactive tabs
« Reply #8 on: November 14, 2022, 02:22:08 pm »
calling refresh every second is not good.

Please find out the event that is fired whenever any hidden tab is activated by Golden Layout.

Inside the event, you can call refresh method on the grids present in the corresponding tab.

Example: https://paramquery.com/pro/demos/tabs