Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
subgrid stuck on "Loading..."
Tags: subgrid
29/12/2011
15:55
Avatar
jbenckert
Member
Members
Forum Posts: 3
Member Since:
29/12/2011
sp_UserOfflineSmall Offline

Hello all,

I've configured a subgrid like below and when I try to expand the rows it just spins on "Loading" forever.  Using the network browser tools it looks like there's never actually a request made to the server. 

Can anyone advise on how to troubleshoot?

Thanks.

-Joe

var listDataURL = '/cms/getDashboardCampaignData.do';
	var initialPageSize = 20;
	var maxRecords = 10000;
	var pageSizes = [initialPageSize, 40, 80,  maxRecords];
	
	// jqGrid Configurations
	jq(function() {
		jQuery("#campaignPerformanceGrid").jqGrid({
		   	url:listDataURL,
			datatype: 'json',
			mtype: 'POST',
		   	colNames:['campaignID', '% Complete', 'CampaignName', 'Priority', 'CTR','Pricing Model','Start', 'More Info'],
		   	colModel:[
		   		{name:'campaignId',index:'campaignId',sorttype:"int", hidden:true},
		   		{name:'completionPercentage',index:'completionPercentage',sorttype:"float"},
		   		{name:'name',index:'name',sorttype:"text"},
		   		{name:'priority',index:'priority',sorttype:"int"},
    		    {name:'ctr',index:'ctr',sorttype:"float"},
    		    {name:'pricingModel',index:'pricingModel',sorttype:"text"},
    		    {name:'startDate',index:'startDate',sorttype:"date"},													
		   		{name:'campaignId', index:'campaignId', formatter:moreInfoFormatter, sortable:false}
		   	],
		   	postData: { },
			rowNum:initialPageSize,
		   	rowList:pageSizes,
        	height: "auto",
        	width: 800,
		   	//autowidth: true,
			altRows     : true,
			ignoreCase: true, //Filter and Sort is case-insensitive
		   	pager: '#pager',
		    viewrecords: true,
		   	sortname: 'name',
		    sortorder: "asc",
		    caption:"",
		    emptyrecords: "No data found",
		    loadonce: true,
		    loadComplete: function() { },
		    jsonReader : {
		        root: "rows",
		        page: "page",
		        total: "total",
		        records: "records",
		        repeatitems: false,
		        cell: "cell",
		        id: "id"
		    },
		    subGrid: true,
		    subGridUrl: '/cms/getDashboardCampaignSubGridData.do',
		    subGridModel : [ 
		      {
		      name  : ['flightId'],
		      width : [55],
		      align : ['left']
		      }
		    ]
		});
		
		// Set Label for rowList
		jQuery("#pager option[value=" + maxRecords + "]").text('All');
		
		
		// Navigation Toobar
		jQuery("#grid").jqGrid('navGrid','#pager',
			{add:false, del:false, edit:false, search:false, refresh:true, 
				beforeRefresh:function() {jq("#grid").jqGrid('setGridParam', {url:listDataURL, datatype:"json"}); }
			},
			{ }, //settings for edit
		    { }, // settings for add
		    { }, // settings for delete
			{}   // enable the advanced searching
		);
		/*
		jq("#grid").navButtonAdd('#pager',
				{ 	caption:"", 
					buttonicon:"ui-icon-plus", 
					onClickButton: showCreateAdvertiserPage,
					position: "last", 
					title:"Create New Advertiser", 
					cursor: "pointer"
				}
		);*/ 
		
		jQuery("#grid").jqGrid('filterToolbar',{stringResult: true,searchOnEnter : false});
		
	});
04/01/2012
23:21
Avatar
lance123
Member
Members
Forum Posts: 9
Member Since:
21/07/2009
sp_UserOfflineSmall Offline

Hi Joe, The issue is a bug with jquery possibly.  I ran into this too.  And could see errors in the console:

 error in Chrome 'loading' dialog never finishes
208 event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future.
Please review http://stackoverflow.com/quest.....ent-layery 

I think the bug is fixed in the latest jQuery.  Let me know if that sorts it?

Hope that helps.

Regards,

Lance

05/01/2012
02:32
Avatar
nelsonm
Michigan, USA
Member
Members
Forum Posts: 106
Member Since:
20/08/2011
sp_UserOfflineSmall Offline

While i did not study the posted code, i have found that in my experence with jqGrid,

getting stuck on "loading" was either a jqgrid coding error or an error in my php script and not a bug in jqgrid.

Try commenting out sections of the jqgrid code and/or temporarally hard coding a vaiid

response from the php script.  Its called the process of elimination.

18/01/2012
23:16
Avatar
lance123
Member
Members
Forum Posts: 9
Member Since:
21/07/2009
sp_UserOfflineSmall Offline

Hi To All,

Final update on this thread.  For my issue it was a combination of my previous post on a bug from jQuery giving us errors when trying to trigger the subgrid.  But the main problem was as follows:

The subgrid was inherriting its datatype from the parent grid which was local.  We needed to explicitly set the subgrid type to xml as follows:

subgridtype: 'xml',

 

Regards, 

Lance

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
58 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information