I have a jqGrid in an InfoWindow that doesn't quite work. It shows the data but the 'loading …' div never goes away(see attached screen shot), and the interactions with the columns is not completely functional. For example, if i resize a column nothing happens. Then if i sort one of the columns the resize takes effect(the sort is functional as well). Also, if i horizontally scroll the content scrolls but the headers do not. The loadComplete and gridComplete events both fire and the loadError does not.
Here is a snippit of code
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
$.post('getMaintModel', {}, function(data){<br /> $('#maintList').jqGrid('GridUnload');<br /> colModel = data<br /> <br /><br /> $("#maintList").jqGrid({<br /> url: 'getLocationMaintenance',<br /> postData: {<br /> 'location': markerFunctionalLocation<br /> },<br /> sortname: 'Equipment',<br /> datatype: 'json',<br /> mtype: 'POST',<br /> colNames: [],<br /> colModel: colModel,<br /> height: '180px',<br /> forcefit: false,<br /> shinktofit: false,<br /> autowidth: false,<br /> rowNum: 50,<br /> rowList: [25, 50, 200],<br /> pager: '#maintPager',<br /> viewrecords: true,<br /> scroll: 1,<br /> prnNames: {<br /> 'npage': 10<br /> },<br /> gridComplete: function(){<br /> $('#maintList').jqGrid('setGridWidth', 500, false)<br /> $("#maintList").jqGrid('navGrid', '#maintPager', {<br /> edit: false, //add iif based or permission level<br /> add: false,<br /> del: false,<br /> search: false,<br /> refresh: false<br /> });<br /> transformerInfoWindow.setOptions({<br /> //content: $('#infoWindowTabs').clone(true)[0],<br /> //content: $('#maintenanceTabDiv').clone(true)[0],<br /> content: $('#maintenanceTabDiv').html(),<br /> position: markerPosition<br /> });<br /> <br /><br /> $([transformerInfoWindow.getContent()]).show();<br /> transformerInfoWindow.close();<br /> transformerInfoWindow.open(map);<br /> }<br /> });<br /> <br /><br /> }, 'json'); |
Normally I set the content of the InfoWindow to ('#infoWindowTabs').clone(true)[0] Which works fine with a
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top