ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: queensgambit9 on January 30, 2020, 09:13:23 pm

Title: grid.refreshHeader(); in tabs
Post by: queensgambit9 on January 30, 2020, 09:13:23 pm
Trying to refresh header using jQuery tabs.

In create event for each grid after getting some data for headers

Code: [Select]
grid.refreshHeader();
Getting error on 2nd tab (first work fine)

Code: [Select]
Uncaught TypeError: Cannot read property '23' of undefined
Title: Re: grid.refreshHeader(); in tabs
Post by: paramvir on January 30, 2020, 09:35:23 pm
Could you please share a jsfiddle.
Title: Re: grid.refreshHeader(); in tabs
Post by: queensgambit9 on February 01, 2020, 09:01:08 pm
https://jsfiddle.net/queensgambit9/g4h0mory/9/
Title: Re: grid.refreshHeader(); in tabs
Post by: paramvir on February 03, 2020, 11:17:51 am
It throws error because its parent div pane has style display:none

Either you can omit call to grid.refreshHeader() in inactive tabs or you can wrap the call in a try catch.

Code: [Select]
try{
      grid.refreshHeader();
}
catch(e){
       
}

https://jsfiddle.net/ka9sr02q/
Title: Re: grid.refreshHeader(); in tabs
Post by: queensgambit9 on February 03, 2020, 02:01:40 pm
Thanks.