首页 > 代码库 > datagrid上面的查询按钮设置了,但是分页工具栏不显示

datagrid上面的查询按钮设置了,但是分页工具栏不显示

原因:查询的linkbutton没有放在toolbar里。

 1 <script type="text/javascript">
 2     $(function(){
 3          $(‘#dg‘).datagrid({
 4              url:‘ContactServlet‘,
 5              toolbar:‘#tb‘,
 6              fit:true,
 7              fitColumns:true,
 8              rownumbers:true,
 9              pagination:true,
10              idField : ‘id‘,
11              columns:[[    
12                        {field:‘id‘,title:‘id‘,checkbox:true},
13                        {field:‘lxr_xm‘,title:‘姓名‘,width:220,align:‘center‘},    
14                        {field:‘lxr_tel‘,title:‘电话‘,width:220,align:‘center‘},    
15                        {field:‘lxr_email‘,title:‘Email‘,width:220,align:‘center‘},     
16                        {field:‘lxr_qq‘,title:‘QQ‘,width:220,align:‘center‘},
17                        {field:‘lxr_lx‘,title:‘联系‘,width:220,align:‘center‘}  
18                    ]] 
19          });
20 
21     });
22 </script>
23 </head>
24 <body>
25 <table id="dg" title="通讯录"></table>
26 <div id="tb" style="height: auto;display: none;" >
27         <a href="javascript:openUserAddDialog()" class="easyui-linkbutton" iconCls="icon-search" plain="true">查询</a>
28         <a href="javascript:openUserAddDialog()" class="easyui-linkbutton" iconCls="icon-add" plain="true">添加</a>
29         <a href="javascript:openUserModifyDialog()" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
30         <a href="javascript:deleteUser()" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
31 </div>
32 </body>
33 </html>

 

datagrid上面的查询按钮设置了,但是分页工具栏不显示