EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jwilliquor on September 20, 2012, 03:45:24 AM



Title: opts.view.render is undefined
Post by: jwilliquor on September 20, 2012, 03:45:24 AM
I am trying to build an dynamic grid via javascript that uses virtual scrolling.  I can get the grid on screen with columns etc. but following the fetch of the rows for the grid i receive the error:

Error: TypeError: opts.view.render is undefined
Source File: http://test.schedulewerks.com/js/jquery.easyui.min.js
Line: 6881

Here's my setup code for the grid.

function Home_BuildGrid(tbl, cols){
   var w = $(document).width()-114;
   var h = $("#westButtons").height()+32;
   
   $('#main').append('<table id="gridMain"></table>');
   $('#gridMain').datagrid({
      view: 'scrollview',
      rownumbers: false,
      singleSelect: true,
      autoRowHeight: false,
      pageSize: 100,
      striped: true,
      loadMsg: true,
      columns: cols,
      width: w,
      height: h,
      url: '/admin/output/fetch?tbl='+tbl,
      onDblClickRow: function(rowIndex, rowData){
         Home_OpenInput(rowData);
      }
   });
}


Thanks
Justin


Title: Re: opts.view.render is undefined
Post by: stworthy on September 20, 2012, 07:06:27 AM
The 'view' property is the view object not string.

$('#gridMain').datagrid({
view: scrollview
});