easyui reload方法报Cannot read property 'options' of undefined
来源:互联网 发布:淘宝卖家新手教程 编辑:程序博客网 时间:2024/04/30 20:24
DataGrid 由JS创建
<div title="资产履历" > <table id="assetGrid"></table> </div>
$("#assetGrid").datagrid({ fit: true, pagination: false,//显示分页 pageSize: 10,//分页大小 pageList: [5, 10, 15, 20],//每页的个数 singleSelect: true, rownumbers: true, columns: [[ { field: 'ProductModel', title: '产品型号', width: 100 }, { field: 'FactoryNumber', title: '出厂编号', width: 100, align: 'left' }, { field: 'InstallationLocation', title: '安装地点', width: 150, align: 'left' }, { field: 'SerialNumber', title: '序列号', width: 150, align: 'left' }, { field: 'AssetCategory', title: '资产分类', width: 150, align: 'left' }, { field: 'OriginalValue', title: '资产原值', width: 200, align: 'left' } ]], url: "" })
做完一些操作后需要清除数据DataGrid数据
var gridJsonData = '{ "total": 0, "rows": [] }';$('#assetGrid').datagrid('loadData',JSON.parse(gridJsonData))
发现或一直报Cannot read property 'options' of undefined
断点发现
function _5f6(_62d,data){var _62e=$.data(_62d,"datagrid");var opts=_62e.options;var dc=_62e.dc;data=opts.loadFilter.call(_62d,data);data.total=parseInt(data.total);_62e.data=data;if(data.footer){_62e.footer=data.footer;}_62d是我HTML创建的#assetGrid元素
因为我是JS创建 没有data-options 所以62e为空
最后只有将列写在页面。
不知道有没有人有其他方法可以让_62e获取到值
0 0
- easyui reload方法报Cannot read property 'options' of undefined
- EasyUI Window Cannot read property 'options' of undefined
- 使用EasyUI的新版本出现Cannot read property 'options' of undefined
- Uncaught TypeError: Cannot read property 'options' of undefined 错误
- Uncaught TypeError: Cannot read property 'options' of undefined
- easyui防止重复提交及进度条报错解决: Cannot read property 'onClose' of undefined
- easyui列表查询报错:Cannot read property 'length' of undefined
- easyui列表查询报错:Cannot read property 'length' of undefined
- easyui中datagrid显示数据的时候报Cannot read property 'length' of undefined
- easyui 异常:Uncaught TypeError: Cannot read property 'tabs' of undefined
- sencha touch报错 Cannot read property 'apply' of undefined
- Webpack+react-router 报 Cannot read property 'toUpperCase' of undefined
- 解决jquery报错cannot read property 'length' of undefined
- vue报错 vue Cannot read property ‘ob’ of undefined
- 解决dataTable 报错:cannot read property "style" of undefined
- Angularjs报错:TypeError: Cannot read property 'slice' of undefined
- react native 报错:cannot read property 'length' of undefined
- jqgrid saveRow方法报错 Cannot read property 'multiple' of undefined的原因
- 跟着廖雪峰的git教程学习(2)时光机穿梭(二)工作区和暂存区
- ♥codeforces 627A-XOR Equation【数学】
- POJ 1106 扫描与OnLeft函数的使用
- Chrome 跨域访问
- STL中vector、list、deque和map的区别
- easyui reload方法报Cannot read property 'options' of undefined
- Android进程通信之一:两种序列化方式
- 浙江省第四届“知识产权杯”创意设计大赛
- Linear Layout
- c++静态库与动态库
- oracle10g安装,卸载
- EventBus的学习笔记
- self = [super init]"的解释与潜藏bug
- Vim中自动加载cscope.out