title: Problem with JQGrid Array Data - clientSide
body: <p>I'm using Google Maps' local search, to find businesses in the area of an specific address.
  The results will be intercepted and should be displayed in a JQGrid table.
  I would like to use JQGrid's "Array Data" to insert the results locally into the Grid.
  At this time I have the following code:</p>
  
  <pre><code>        &lt;script type="text/javascript"&gt;
          var map = null;
      var geocoder = null;
  
      function initialize() {
          /* Initialize Google Maps */
        if (GBrowserIsCompatible()) {
          map = new GMap2(document.getElementById("map"));
          map.setCenter(new GLatLng(50.786916, 6.101360), 16);
          //map.setUIToDefault();
          var customUI = map.getDefaultUI();
                  customUI.controls.scalecontrol = false;
                  map.setUI(customUI);
          var options = {
              onSearchCompleteCallback:function(searcher){
                  var resultcontent = '';
                  if (searcher.results &amp;&amp; searcher.results.length &gt; 0) {
                      for (var i = 0; i &lt; searcher.results.length; i++) {
                          var result = searcher.results[i];
  
                          // Split Address-Lines into Street and No
                          var TempString = result.addressLines[0];
                          var StreetLine = TempString.split(/\b[0-9]/);
                          // Split Address-Lines to get Zipcode
                          TempString = result.addressLines[1];
                          var CityLine = TempString.split(/\b[^0-9]/);
  
                          // Construct the Data Array
                          var InputData = "{Firma:\""+result.titleNoFormatting+"\", Strasse:\""+StreetLine[0]+"\", Hausnummer:\""+StreetLine[1]+"\", Postleitzahl:\""+CityLine[0]+"\", Ort:\""+result.city+"\", Telefonnummer:\""+result.phoneNumbers[0].number+"\"}"; 
                          alert(InputData);
                          // Outputs for example: {Firma:"Lukull Pizza Service GbR", Strasse:"Jülicher Straße ", Hausnummer:"6", Postleitzahl:"52070", Ort:"AACHEN", Telefonnummer:"0241 9010080"}
  
                          // Apply Data to Grid
                          jQuery("#ResultGrid").addRowData(i, InputData);
                      }
                  }
              }
          };
          localSearch = new google.maps.LocalSearch(options);
          map.addControl(localSearch);
          map.removeControl(GScaleControl);
  
          geocoder = new GClientGeocoder();
          $("#map").hide("fast");
        }
      }   
      function showAddress(address, CompleteAdd) {
        // Gets an address from database to pinpoint the location
        if (geocoder) {
          geocoder.getLatLng(
            address,
            function(point) {
              if (!point) {
                alert(address + " not found");
              } else {
                map.setCenter(point, 16);
                var marker = new GMarker(point);
                map.addOverlay(marker);
                marker.openInfoWindowHtml(CompleteAdd);
              }
            }
          );
        }
        $("#map").show("fast");
      }
           $("#ResultGrid")
              .jqGrid({
                  colNames:['ID', 'Firma', 'Strasse', 'Hausnummer', 'Postleitzahl', 'Ort', 'Telefonnummer'],
                  colModel:[
                  {name:'ID', index:'ID', width:55, editable:false, searchable:false},
                  {name:'Nachname', index:'Nachname', width:150, editable:false, searchable:false},
                  {name:'Strasse', index:'Strasse', width:150, editable:false, searchable:false},
                  {name:'Hausnummer', index:'Hausnummer', width:150, editable:false, searchable:false, sorttype:'int'},
                  {name:'Postleitzahl', index:'Postleitzahl', width:150, editable:false, searchable:false, sorttype:'int'},
                  {name:'Ort', index:'Ort', width:150, editable:false, searchable:false},
                  {name:'Telefonnummer', index:'Telefonnummer', width:150, editable:false, searchable:false}
                  ],
                  datatype: 'clientSide',
                  //editurl:'Edit.php',
                  height: 240,
                  multiselect: true,
                  pager:'#ResultPager'
              })
              .navGrid('#ResultPager', {view:false, edit:false, add:false, del:false, search:false, refresh:false} )
              .navButtonAdd('#ResultPager', {title:"Adresse in Addressbuch speichern", buttonicon:"ui-icon-disk", caption:"In Adressbuch speichern", onClickButton:function(){
                  //This method should save the selected addresses to the database
                  }})                 
           });
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload="initialize()" onunload="GUnload()"&gt;
      &lt;div class="main" align="center"&gt;
          &lt;table id="MyGrid"&gt;&lt;/table&gt;
          &lt;div id="pager"&gt;&lt;/div&gt;      
          &lt;div class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable ui-resizable" style="height: 150px" id="Dialog"&gt;&lt;/div&gt;
          &lt;div id="map" style="width: 850px; height:450px; padding:10px; font-size: medium; color:#853805; background-color:#FFE8CF;"&gt;&lt;/div&gt;
          &lt;br/&gt;
  
          &lt;div id="ResultGrid"&gt;
              &lt;div id="ResultPager"&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>If a Search is completed and the onSearchCompleteCallback function is called I get this error in firebug:</p>
  
  <pre><code>t.rows is undefined
  http://localhost/jQuery_Adressbuch/js/jquery.jqGrid.min.js
  Line 123
  </code></pre>
  
  <p>I can't find any solution for this problem.
  Does anyone know more about this error or about using local data arrays with JQGrid?</p>
  
  <p>P.S.: I solved the problem. In the HTML section, I created a DIV tag for the Grid instead of a table... pretty stupid of me</p>