title: jquery easyui datagrid Error
body: <p>i got error whenever i call this line in my any function...</p>
  
  <pre><code>$('#tt').datagrid('getRows').length;
  </code></pre>
  
  <p>FireBug Error: </p>
  
  <pre><code>TypeError: $.data(...) is undefined
  return $.data(jq[0],"datagrid").data.rows;
  </code></pre>
  
  <p>My Code..
  test.aspx</p>
  
  <pre><code>&lt;table id="tt" title="DataGrid" tabindex="511" singleselect="true" idfield="Id"&gt;
  </code></pre>
  
  <p>And </p>
  
  <pre><code>function _insertFilter(){
          var index = $('#tt').datagrid('getRows').length; // error 
          var row = $('#tt').datagrid('getEditors', index); //
          if (row)
              row = [];//error handle by this
          if (row.length&gt;0 &amp;&amp; !row[0].target.val() &amp;&amp; !row[1].target.val()){
  
          } else {
              var toAdd = true;
              var editors = $('#tt').datagrid('getEditors',   ($('#tt').datagrid('getRows').length-1));
              if (editors.length&gt;0) {
                  if (editors[0].target.val() == "" &amp;&amp; editors[1].target.val() == "")
                      toAdd = false;
              }
  </code></pre>
  
  <p>before this i initialize my table  with  below function</p>
  
  <pre><code> function FilterDataGrid() {
          $(function() {
              var lastIndex;                
              $('#tt').datagrid({
                  title: '',
                  idField: 'Id',
                  height: 160,                    
                  width: 850, 
                  singleSelect:true,
                  columns: [[
                      { field: 'Id', title: 'Id', hidden: true, width: 60 },
                      { field: 'AccountName', title: 'Account', width: 390,
                          editor:{
              type:'text',.....more code //bt  here is no problem 
  </code></pre>