extjs grid demo
Ext.onReady(function () {
var store = Ext.create('Ext.data.Store', {
fields: ['id', 'name', 'account', 'password'],
pageSize: 20,
remoteSort: false,
remoteFilter: true,
proxy: {
type: 'ajax',
actionMethods: {
read: 'POST'
},
url: h.url + '/t/100',
reader: {
type: 'json',
root: 'rows',
totalProperty: 'total'
}
},
autoLoad: true
});
var grid = Ext.create('Ext.grid.Panel', {
renderTo: Ext.getBody(),
title: '用户列表',
store: store,
width: 800,
height: 400,
margin: 20,
columns: [
{text: 'id', dataIndex: 'id'},
{text: 'name', dataIndex: 'name', flex: 1},
{text: 'account', dataIndex: 'account'},
{text: 'password', dataIndex: 'password'}
],
bbar: [
{
xtype: 'pagingtoolbar',
store: store,
displayMsg: '显示 {0} - {1} 条,共计 {2} 条',
emptyMsg: "没有数据",
beforePageText: "当前页",
afterPageText: "共{0}页",
displayInfo: true
}
],
tbar: [
{text: '新增', iconCls: 'add', handler: add}, "-",
{text: '编辑', iconCls: 'edit', handler: edit}, "-",
{text: '删除', iconCls: 'delete', handler: del}, "-"
]
});
});
extjs grid demo的更多相关文章
- ExtJS Grid导出excel文件
ExtJS Grid导出excel文件, 需下载POI:链接:http://pan.baidu.com/s/1i3lkPhF 密码:rqbg 1.将Grid表格数据连同表格列名传到后台 2.后台导出e ...
- extjs grid renderer用法
extjs grid renderer用法 摘自:http://www.cnblogs.com/ljian/archive/2011/10/27/2226959.html var cm = new E ...
- 解决extjs grid 不随窗口大小自适应的问题
解决extjs grid 不随窗口大小自适应的问题 August 30, 2010 zhai Javascript 8,403 viewsGo to comment 最近遇到的问题,在使用grid的时 ...
- Extjs grid分页多选记忆功能
很多同事在用extjs grid做分页的时候,往往会想用grid的多选功能来实现导出Excel之类的功能(也就是所谓的多选记忆功能),但在选选择下一页的时候 上一页选中的已经清除 这是因为做分页的时候 ...
- extjs grid数据改变后刷新的实现
做了一个编辑extjs grid记录的窗体,但更改数据后,怎么重新刷新grid让数据显示呢? 做了半天的尝试,其实到最后只需一句话,faint:-) this.store.reload(); 不用加任 ...
- 72. js EXTJS grid renderer用法
转自:https://blog.csdn.net/shancunxiaoyazhi/article/details/22156083 renderer : Function (可选的)该函数用于加工单 ...
- Extjs Grid 各种Demo
grid的一个渲染效果 Ext.define('cfWeb.view.accountSetting.OrgManageView',{ alias : 'widget.orgManageView', e ...
- ExtJs Grid 删除,编辑,查看详细等超链接处理
在网上查了好多资料,关于ExtJs处理操作栏的“删除”.“编辑”.“查看详细”的处理,原来项目都是这么处理: 操作栏:{ text:'操作', xtype:'actioncolumn', items ...
- [转]ExtJS Grid 分页时保持选中的简单实现方法
原文地址 :http://www.qeefee.com/article/ext-grid-keep-paging-selection ExtJS中经常要用到分页和选择,但是当选择遇到分页的时候,杯具就 ...
随机推荐
- 玩下软工项目,第一轮--全局Context的获取,SQLite的建立与增删改查,读取用户通话记录信息
项目的Github地址:https://github.com/ggrcwxh/LastTime 采用基于git的多人协作开发模式 软件采用mvc设计模式,前端这么艺术的事我不太懂,交给斌豪同学去头疼了 ...
- 实现Spring管理struts的Action
struts2和spring的整合,关键点在于struts2中的action要纳入spring容器的管理中成为一个bean. 可以在struts2中配置: <struts> ...
- selenium webdriver XPath的定位方法练习 !
html 代码: <html> <body> <div id="div1"> <input name="divl1input& ...
- mac下面安装Navicat Premium 12.0.24 for mac已破解中文亲测可用
链接:https://pan.baidu.com/s/17HQ7dsCun2cSJGRpdP9yXA 密码:hwq5 Navicat_Premium_mac 最新版 12.0.24(原版是英文的) ...
- Django之logging日志
简介 Django使用python自带的logging 作为日志打印工具.简单介绍下logging. logging 是线程安全的,其主要由4部分组成: Logger 用户使用的直接接口,将日志传递给 ...
- vscode如何用浏览器预览运行html文件
1,打开vscode编辑器,点击编辑器主界面左上侧第五个小图标——‘扩展’按钮: 2,进入扩展搜索右拉框,在应用商店搜索框中输入“view in browser”会自动进行搜索 3,等待几秒钟时间,扩 ...
- jenkins配置slave节点 构建项目并执行操作
1.新建与配置结点 [系统管理]-> [管理结点]-> [新建结点] 2.配置slave 说明: Name: 定义slave的唯一名称标识,可以是任意字符串,通常设置为slave主机名.i ...
- Spring Cloud Config
1.config服务端配置 1.1 引入依赖 <dependency> <groupId>org.springframework.boot</groupId> &l ...
- Appium与Robotium区别
Appium是基于UIAutomator框架实现的.Appium测试进程与目标应用进程是分开的,所以Appium不能直接访问目标应用的各种element属性进行copy&paste,而只能模拟 ...
- 【明哥报错簿】tomcat 安装时出现 Failed to install Tomcat7 service
安装tomcat时提示 Failed to install Tomcat7 service 应该是卸载时直接删除目录导致的. Failed to install Tomcat7 service Che ...