I have found that if I comment out one of the other datagrids from one of the other tabs, then the first tab loads properly. Is there a limit on the number of datagrids that can be loaded simultaneously, or maybe it's a related to the loading time? If it's loading time I am hoping I can use the solution below, but I can't get the filter to work.
I'm trying to use the href option to make it so the whole page loads faster, but the 'enableFilter' option is not taking effect when this happens. Please see
http://www.jeasyui.com/forum/index.php?topic=6024.0 Thanks!
Here's an example of the href:
In the main file editor.php
<!--Tab 7--><div title="Other IP Devices" style="padding:5px;height:100%" href="_tab7.html"></div>
_tab7.html:
<script>
//http://www.jeasyui.com/forum/index.php?topic=6024.0
$(function(){
$('#dg-ipd').edatagrid({});
$('#dg-ipd').edatagrid('enableFilter');
});
</script>
<!--DataGrid editor for IPD-->
<table id="dg-ipd" title="Other IP Devices: Double click the row to begin editing." toolbar="#toolbar-ipd" idField="id" class="easyui-datagrid" fit="true" fitColumns="true" pagination="true" rownumbers="false" singleSelect="true" remoteFilter="true" remoteSort="true" pageSize="50" url='get_ipd.php' loadMsg="Loading data" updateUrl='update_ipd.php' toolbar='#toolbar-ipd' fitColumns='true' >
<thead >
<tr>
<th field="id" width="20">Inv ID</th>
<th field="location" width="20">Location</th>
<th field="make" width="20">Make</th>
<th field="model" width="20">Model</th>
<th field="mac" width="20">MAC</th>
<th field="name" width="20" editor="text">Device Name</th>
<th field="ip" width="20" editor="text">IP</th>
<th field="ip_link" width="20" formatter="ip_link">IP</th>
<th data-options="field:'uplink_device',width:20, formatter: function(value,row){return row.uplink_device}"
editor="{type:'combobox',
options:{
valueField: 'uplink_device_name',
textField: 'uplink_device_name',
url: 'search_uplink_device_name.php',
onSelect: function(rec)
{
var url = 'search_uplink_device_name.php?q=' + rec.uplink_device_name;
$.getJSON( url, function( data )
{
var result = eval('(' + data + ')');
alert(result.uplink_device_name);
});
}
}
}"
>Uplink Device</th>
</tr>
</thead>
</table>
<div id="toolbar-ipd">
<a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="javascript:$('#dg-ipd').edatagrid('saveRow')">Save Changes</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-undo" plain="true" onclick="javascript:$('#dg-ipd').edatagrid('cancelRow')">Cancel</a>
</div>