Author Topic: Grid in jQuery UI tab  (Read 4878 times)

przemek

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 25
    • View Profile
Grid in jQuery UI tab
« on: June 04, 2014, 06:13:37 pm »
Hello,

I don't know how to add grid to jQuery UI tab.

This is code example with grids generated from the same php file using simple jquery plugin: http://czasopismocatering.pl/pqtabs/

Please tell me how to display correctly grid in tab.

Best regards ,
Przemek


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Grid in jQuery UI tab
« Reply #1 on: June 04, 2014, 07:01:47 pm »
you need to refresh the grid in corresponding panel upon activate event

$( '.tabselector' ).tabs().on("tabsactivate", function (evt, ui) {
        var $grid = ui.newPanel.find(".pq-grid");
        $grid.pqGrid("refresh");                   
});

For live example: http://paramquery.com/pro/demos/detail
Please refer line number 55 - 58
« Last Edit: June 04, 2014, 07:04:25 pm by paramquery »

przemek

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Grid in jQuery UI tab
« Reply #2 on: June 04, 2014, 07:34:10 pm »
It works great.

Thanks a lot!