这个示例向你展示如何添加toolbar到datagrid.

创建 DataGrid

<table id="tt" class="easyui-datagrid" style="width:600px;height:250px"

url="data/datagrid_data.json"

title="DataGrid with Toolbar" iconCls="icon-save"

toolbar="#tb">

<thead>

<tr>

<th field="itemid" width="80">Item ID</th>

<th field="productid" width="80">Product ID</th>

<th field="listprice" width="80" align="right">List Price</th>

<th field="unitcost" width="80" align="right">Unit Cost</th>

<th field="attr1" width="150">Attribute</th>

<th field="status" width="60" align="center">Stauts</th>

</tr>

</thead>

</table>

<div id="tb">

<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="javascript:alert('Add')">Add</a>

<a href="#" class="easyui-linkbutton" iconCls="icon-cut" plain="true" onclick="javascript:alert('Cut')">Cut</a>

<a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="javascript:alert('Save')">Save</a>

</div>

我们不需要写任何的javascript代码,附加toolbar到datagrid通过'toolbar'属性.

最新文章

  1. ABP 初探 之 AbpSession 扩展
  2. hive --service metastore 出现的问题
  3. Nginx图片剪裁模块探究
  4. 欢迎加入.Net高级部落 173844862
  5. 【wikioi】1012 最大公约数和最小公倍数问题
  6. JavaScript对象的创建之基于原型方式
  7. 保持长宽比 对背景图像进行修改android:scaleType=&quot;fitXY&quot;
  8. c++中参数传递和函数返回简析
  9. BZOJ 3479: [Usaco2014 Mar]Watering the Fields( MST )
  10. JS定时跳转URL并输出剩余秒数
  11. C#编程中的Image/Bitmap与base64的转换及 Base-64 字符数组或字符串的长度无效问题 解决
  12. u-boot(一)启动简介
  13. Linux基础命令---查找用户信息finger
  14. Tomcat 的 JDBC 连接池
  15. Atitit 遍历文件夹算法 autoit attilax总结
  16. 8 -- 深入使用Spring -- 7...2 MVC框架与Spring整合的思考
  17. BZOJ 1007 [HNOI2008]水平可见直线 (栈)
  18. hdu 4981
  19. git push时提示&quot;fatal: The current branch master has no...&quot;
  20. java.util.concurrent.CyclicBarrier 使用

热门文章

  1. 2017年8个UI设计流行趋势
  2. C++:C++的两种多态形式
  3. Python_转义字符
  4. Python之路----------ConfigParser模块
  5. [转]理解I/O Completion Port
  6. MAC使用MAMP构建自签名HTTPS环境
  7. 一个DNS统计,RCFs,工具站点
  8. 无限分页//////////////zz
  9. 。。。欢乐捕鱼App WeX5 连接打包代理服务失败,请检查代理服务地址是否正确。。。
  10. 夺命雷公狗-----React---27--小案例之react经典案例todos(清除已完成)