Title: 'panel' undefined when refresh panel href page contain datagrid with paging
Post by: Aod47 on July 27, 2015, 12:47:16 AM
Chrome browser shown "Uncaught TypeError: Cannot read property 'panel' of undefined" When I try to refresh panel onSelect Tab event. Error occurred only href page that contain datagrid with paging. <body> <div class="easyui-layout" id="viewport" fit="true"> <div id="TpConfig" class="easyui-tabs" data-options="fit:true,onSelect:refreshPanel"> <div id="TabUserCtrl" title="Users Control" data-options="href:'TabTemplate1.aspx'" style="padding:10px;"></div> <div id="TabSystemSetting" title="System Settings" data-options="href:'TabTemplate2.aspx'" style="padding:10px;"></div> </div> </div> <script type="text/javascript"> function refreshPanel(title, index) { var p = $(this).tabs('getTab', index); // get current tab p.panel('refresh'); // error this line } </script> </body>
Could you please advice. Many Thank
Title: Re: 'panel' undefined when refresh panel href page contain datagrid with paging
Post by: stworthy on July 27, 2015, 01:25:26 AM
Make sure you have created the datagrid successfully before calling 'getPager' method. var dg = $('#dg').datagrid(); // create datagrid var pager = dg.datagrid('getPager');
Title: Re: 'panel' undefined when refresh panel href page contain datagrid with paging
Post by: Aod47 on July 27, 2015, 07:18:05 AM
I tried load page 'TabTemplate2.aspx' directly. No error message. <body> <table id="GridSpInventory" idField="id" class="easyui-datagrid" data-options=" url: 'getJobs.aspx', /* present json file format */ rownumbers: false, method: 'post', striped: true, pagination: true, fit: true, singleSelect: true "> <thead> <tr> <th data-options="field:'custId',hidden:true">CUSTID</th> <th data-options="field:'vid',hidden:true">VID</th> <th data-options="field:'id',hidden:true" width="5%"><b>ID</b></th> <th data-options="field:'jobNumber',align:'left',resizable:true" width="10%"><b>Job Number</b></th> <th data-options="field:'created',align:'left',resizable:true" width="15%"><b>Date</b></th> <th data-options="field:'brand',align:'left',resizable:true" width="10%"><b>Brand</b></th> <th data-options="field:'regNumber',align:'left',resizable:true" width="15%"><b>License Number</b></th> <th data-options="field:'customerName',align:'left',resizable:true" width="20%"><b>Customer</b></th> <th data-options="field:'jobStatus',align:'left',resizable:true" width="10%"><b>Status</b></th> <th data-options="field:'creatorName',align:'left',resizable:true" width="10%"><b>Creator</b></th> </tr> </thead> </table> </body>
|