Howdy...
I'm trying up update a client using EasyUI for JQuery and most of the grids work fine, except for a couple. I'm getting errors like the following:
Uncaught TypeError: Cannot read property 'options' of undefined
at Object.options (jquery.easyui.min.js?v=1:11929)
at n.fn.init.$.fn.datagrid (jquery.easyui.min.js?v=1:11792)
at HTMLTableElement.<anonymous> (jquery.easyui.min.js?v=1:11953)
at Function.each (jquery-1.12.4.min.js:2)
at n.fn.init.each (jquery-1.12.4.min.js:2)
at Object.load (jquery.easyui.min.js?v=1:11952)
at n.fn.init.$.fn.datagrid (jquery.easyui.min.js?v=1:11792)
at HTMLInputElement.onSelect (?tID=4:129)
at _b36 (jquery.easyui.min.js?v=1:15011)
at _b44 (jquery.easyui.min.js?v=1:15051)
I think I've traced this to the dataGrid,
$.fn.datagrid.methods = {
options: function(jq) {
var _8ad = $.data(jq[0], "datagrid").options;
But I can't find anything wrong with how the options are setup.
I've moved them to the js reference (starts with toolbar):
$('#dg').datagrid({
url: '/controls/foo.aspx?a=getFullList',
onBeforeLoad: function (param) {
param.f = $('#dgFilter1').combobox('getValue');
param.s = encodeURI($('#dgSearch').searchbox('getValue'));
param.first = firstLoad;
firstLoad = false;
},
toolbar: '#toolbar',
pagination: true,
rownumbers: false,
singleSelect: true,
striped: true,
remoteSort: true,
sortName: 'FullName'
});
I've changed them from inline (original way) within the table to data-options parameter:
<table id="dg" title="Blah Blah Blah" style="height:300px" width="720px"
toolbar="#toolbar" pagination="true"
rownumbers="false" singleSelect="true" striped="true" remoteSort="true" sortName="FullName">
or
<table id="dg" title="Blah Blah Blah" style="height:300px" width="720px"
data-options=" toolbar: '#toolbar',pagination: true,rownumbers: false,singleSelect: true,
striped: true,remoteSort: true,sortName: 'FullName'">
Nothing seems to work.
All ideas welcome.
P.S We had references to edatagrid (which I updated to latest version also) and a custom extension to EasyUI, I removed those just for this page and they don't appear to be the problem.