I am having an issue that I need help with. I have 3 jQueryUI Tabs. The first holds a grid of items. The second holds a grid of Work Orders. The third just fires an alert to verify the show function is working. Problem is I have no grid on the second tab. First one loads fine. If I comment out the code for the first tab, the second grid shows up fine. Third tab fires an alert every time. I have a lightbox that i use to edit items on select which works fine. Here's the relevant code:
jQuery(document).ready(function () {
$('#tabs').tabs({
show: function(event, ui) {
if(ui.index == 0)
{
jQuery("#list1").jqGrid({
...
pager: '#pager1',
...
jQuery("#list1").jqGrid('navGrid','#pager1',{edit:false,add:false,del:false});
}
else if(ui.index == 1)
{
$("#list").jqGrid({
...
pager: '#pager',
....
onSelectRow: function(id){
if(id){
alert(id);
onclick=openbox('Edit Work Order', 1);
...
else if(ui.index == 2)
{
alert('tab2');
}
}
I appreciate any help you can give.
I know its an old question. But I also faced the same issue where in I had multiple jqGrids under the tabs and the loading thing was not working. Adding the below code in the javascript just before defining the grid worked for me:
For me, the grids on different tabs where the same only the data inside the grid was changing.
Probably your problem exist because you used the HTML code
instead of
I modified you code a little to the following
I included array
initGrids
which will be used to initialize every grid only once, commented unclear code likeonclick = openbox('Edit Work Order', 1);
and fixedsortname
.You can see the demo. The grid contain will be not filled, because I not have any server components on the server