www.webdeveloper.com
Results 1 to 1 of 1

Thread: jqGrid in a Google maps InfoWindow

  1. #1
    Join Date
    Nov 2010
    Posts
    23

    jqGrid in a Google maps InfoWindow

    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

    Code:
    $.post('getMaintModel', {}, function(data){
                        $('#maintList').jqGrid('GridUnload');
                        colModel = data
                        
                        $("#maintList").jqGrid({
                            url: 'getLocationMaintenance',
                            postData: {
                                'location': markerFunctionalLocation
                            },
                            sortname: 'Equipment',
                            datatype: 'json',
                            mtype: 'POST',
                            colNames: [],
                            colModel: colModel,
                            height: '180px',
                            forcefit: false, 
                            shinktofit: false, 
                            autowidth: false,
                            rowNum: 50,
                            rowList: [25, 50, 200],
                            pager: '#maintPager',
                            viewrecords: true,
                            scroll: 1,
                            prnNames: {
                                'npage': 10
                            },
                            gridComplete: function(){
                                $('#maintList').jqGrid('setGridWidth', 500, false)
                                $("#maintList").jqGrid('navGrid', '#maintPager', {
                                    edit: false, //add iif based or permission level
                                    add: false,
                                    del: false,
                                    search: false,
                                    refresh: false
                                });
                                transformerInfoWindow.setOptions({
                                    //content: $('#infoWindowTabs').clone(true)[0],
                                    //content: $('#maintenanceTabDiv').clone(true)[0],
                                    content: $('#maintenanceTabDiv').html(),
                                    position: markerPosition
                                });
                                
                                
                                $([transformerInfoWindow.getContent()]).show();
                                transformerInfoWindow.close();
                                transformerInfoWindow.open(map);
                            }
                        });
                        
                    }, 'json');
    Normally I set the content of the InfoWindow to ('#infoWindowTabs').clone(true)[0] Which works fine with a jQuery tabs. But for testing I'm leaving the tab part out and just attempting to get the jqgrid to work. Any ideas?
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles