Author Topic: pqGrids in jQueryUI tabs  (Read 4757 times)

omerix

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 147
    • View Profile
pqGrids in jQueryUI tabs
« on: January 22, 2014, 04:14:28 pm »
Hello,

I am using Jquery.ui v1.10.3 and jQuery v1.9.1.  I have 3 or 4 grid in one page in different tabs. I am making those grids with document.ready as GridCreate1() GridCreate2(). However rows are not correctly visible on the grids opened on other tabs, while active grid is ok. Sometimes columns are merging and sometimes rows are not vissible at all.
Could you please advice how solve?

Meanwhile I have some more questions and  I need to send you screen samples but I do not want to do it from here because code can be taken easily by others. Could you please advice how can I send you those screens?


« Last Edit: January 22, 2014, 07:47:34 pm by paramquery »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: pqGrids in jQueryUI tabs
« Reply #1 on: January 23, 2014, 08:37:28 am »
You need to ensure that pqGrid is refreshed whenever corresponding tab is activated.

Use http://api.jqueryui.com/tabs/#event-activate to listen to activate event and refresh pqGrid in this event

$grid.pqGrid( 'refresh' );


====================================================================
You may post your screens as attachments in the FORUM. They won't be visible to other users if you wish so.
« Last Edit: January 23, 2014, 08:39:03 am by paramquery »

omerix

  • Pro Enterprise
  • Full Member
  • *
  • Posts: 147
    • View Profile
Re: pqGrids in jQueryUI tabs
« Reply #2 on: January 23, 2014, 05:51:45 pm »
Yes tried thanks

Code: [Select]
<script type='text/javascript'>
$(document).ready(function () {
$("#UiTab").tabs({
load: function( event, ui ) {}
,activate: function(event,ui) {
var ix=ui.newTab.index();
switch (ix) {
case 0:
$("#gridYetki").pqGrid("refresh");
break
case 1:
$("#gridBolum").pqGrid("refresh");
break
default:
console.log(ix);
}
}});
});
</script>