这个示例向你展示如何添加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'属性.

如何静态添加toolbar到datagrid的更多相关文章

  1. 使用easyUI 创建复杂的toolbar到datagrid

    http://www.cnblogs.com/javaexam2/archive/2012/08/10/2632649.html @author YHC datagrid 的toolbar能包含的不仅 ...

  2. 如何给非AppCompatActivity添加Toolbar?--关于5.0新特性兼容5.0以下设备的探索

    Android支持包22.1引进了AppCompatDelegate 最新22.1版本的支持包引入了大量酷炫的新特性,这些特性将允许我们轻易地将材料设计/API 21+的特性应用到之前的那些老的,不兼 ...

  3. Easyui combogrid添加toolbar

    近一段时间一直在做Easyui的一个项目.官方的资料 API有些不全,把自己遇到的解决的问题发出来希望能帮助到大家. combogrid这个控件绑定了一个DataGrid,API也没有说可以绑定Too ...

  4. Android6.0 源码修改之Setting列表配置项动态添加和静态添加

    写在前面 最近客户有个需求,要求增加操作Setting列表配置项的功能,是不是一脸懵,没关系,一图胜千言,接下来就上图.诺,就是这么个意思.   原来的列表配置项     增加了单个配置项     增 ...

  5. easyUI 添加排序到datagrid

    http://www.cnblogs.com/javaexam2/archive/2012/08/10/2632645.html

  6. 项目一:第三天 收派标准添加 收派标准分页查询(基于datagrid实现) 收派标准修改快递员添加 快递员列表查询

    1.收派标准添加 n jQuery easyUI window使用 n jQuery easyUI form表单校验 n 收派标准添加页面调整—url params n 服务端实现—三层 2.jQue ...

  7. easyui_动态添加隐藏toolbar按钮

    目标:动态添加隐藏toolbar,比如根据权限动态显示新增.修改.删除按钮等 思路:先初始化toolbar的所有按钮,加载datagrid其它信息,再根据权限显示隐藏toolbar按钮 步骤: 1.加 ...

  8. 扩展easyui.datagrid,添加数据loading遮罩效果代码 --来自网摘收集

    //jquery.datagrid 扩展 (function (){ $.extend($.fn.datagrid.methods, { //显示遮罩 loading: function(jq){ r ...

  9. easyui datagrid 行右键生成 动态获取(toolbar) 按钮

    var createGridRowContextMenu = function(e, rowIndex, rowData) { e.preventDefault(); var grid = $(thi ...

随机推荐

  1. 学习笔记---C/C++语法

    一.char *s char s[] 区别 char *s中的s是指针,而指针是指向一块内存区域,它指向的内存区域的大小可以随时改变,而且当指针指向常量字符串时,它的内容是不可以被修改的,否则在运行时 ...

  2. vs2015企业版和专业版秘钥

    专业版:HMGNV-WCYXV-X7G9W-YCX63-B98R2企业版:HM6NR-QXX7C-DFW2Y-8B82K-WTYJV 来自http://www.cnblogs.com/xuhongfe ...

  3. ubuntu 上安装字体

    http://www.360doc.com/content/11/0901/23/4171006_145128703.shtml http://www.linuxidc.com/Linux/2008- ...

  4. Base64加密算法封装

    /// <summary>/// 实现Base64加密解密/// </summary>public sealed class Base64{/// <summary> ...

  5. 【vue.js权威指南】读书笔记(第一章)

    最近在读新书<vue.js权威指南>,一边读,一边把笔记整理下来,方便自己以后温故知新,也希望能把自己的读书心得分享给大家. [第1章:遇见vue.js] vue.js是什么? vue.j ...

  6. 一次性搞明白 service和factory区别

    原文链接 http://blog.thoughtram.io/angular/2015/07/07/service-vs-factory-once-and-for-all.html 等下,已经有一篇文 ...

  7. 使用 apache2 + `mod_proxy_uwsgi` + uwsgi + upstart 部署

    使用 apache2 + mod_proxy_uwsgi + uwsgi + upstart 部署 网上运行 python wsgi 的应用时,大部分的资料都是使用 nginx .uwsgi ,很少资 ...

  8. logstash插件

    codec 插件   goeip插件 input { file { path => ["/data/nginx/logs/access.log"] type =>&qu ...

  9. Leetcode: Encode String with Shortest Length && G面经

    Given a non-empty string, encode the string such that its encoded length is the shortest. The encodi ...

  10. 在windows 与Linux间实现文件传输(C++&C实现)

    要实现windows与linux间的文件传输,可以通过socket网络编程来实现. 这次要实现的功能与<Windows下通过socket进行字符串和文件传输>中实现的功能相同,即客户端首先 ...