Author Topic: switch tab, the grid become blank  (Read 1176 times)

msdnweixiao

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
switch tab, the grid become blank
« on: December 11, 2020, 01:48:38 pm »
Our project uses the internal tab page and iframe layout.
When the grid in tab1 exceeds 1000, position the mouse on line 220. Switch to TAB2. There are also grids in it, which are more than 1000. Once again, position the mouse on line 300.
When you switch to tab1, the grid in tab1 will be blank. If you scroll the mouse, the previous data will appear, but the first row has been located.
When you go back to TAB2, the same thing happens. The grid inside is blank. If you scroll the mouse, the previous data will appear, but the first row has been located.

However, if there are only 10 pieces of data in the grid, the above situation will not appear.

Therefore, I think it has something to do with the number of items displayed in the grid. When the number of items is too large, the grid will not load in.
It doesn't matter in my IE browser, but it will happen in the IE browser of other colleagues.

Is my judgment correct? So how to solve this problem?
thank you. The screenshot in the attachment,

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: switch tab, the grid become blank
« Reply #1 on: December 11, 2020, 02:46:39 pm »
It has been answered quite no of times in the forum:

Whenever a tab is activated, all the grids corresponding to that tab should be refreshed.

Code: [Select]
$("#tabs").tabs({
    activate: function(evt, ui) {
      //important to refresh grid whenever corresponding  tab is activated.
      ui.newPanel.find(".pq-grid").pqGrid("refresh");
    }
})