Author Topic: Pivot with tab on modal  (Read 517 times)

ibizlink

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 8
    • View Profile
Pivot with tab on modal
« on: February 13, 2022, 06:30:05 pm »
HI

I am trying to use Pivot with tab example on modal, but it is not activate with pivot table initially.

It is okay if activated with data tab initially but no luck for pivot table.

I use the below code and it works well with data tab but no luck for pivot table tab.

                $("#modal_lg").on("shown.bs.modal", function () {
                    pq.Grid.refresh();

                });

(I use examtly same code on the example code (Pivot with tabs))

Thanks,


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Pivot with tab on modal
« Reply #1 on: February 14, 2022, 10:38:52 am »
/** Initially **/

Please use tabModel API: https://paramquery.com/pro/api#option-tabModel

tabModel.activeId sets the active tab initially.

tabModel:{
  activeId: number
}

/** run time */

grid.Tab().activate( id ) is used to set active Tab at run time.

To refresh an active tab grid at run time:

Code: [Select]
  var Tab = grid.Tab(); //where grid is the instance of main grid.
  Tab.grid( Tab.activeTab() ).refresh();

Please check Tab API: https://paramquery.com/pro/api#method-Tab