Ext checkbox
Ext.require([
'Ext.grid.*', 'Ext.data.*', 'Ext.util.*', 'Ext.grid.PagingScroller', 'Ext.ux.RowExpander', 'Ext.selection.CheckboxModel' ]);Ext.onReady(function(){ Ext.define('ForumThread', { extend: 'Ext.data.Model', fields: [ 'title', 'forumtitle', 'forumid', 'author', {name: 'replycount', type: 'int'}, {name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp'}, 'lastposter', 'excerpt', 'threadid' ], idProperty: 'threadid' }); // create the Data Store var sm = Ext.create('Ext.selection.CheckboxModel'); var store = Ext.create('Ext.data.Store', { id: 'store', pageSize: 200, model: 'ForumThread', remoteSort: true, // allow the grid to interact with the paging scroller by buffering buffered: true, proxy: { // load using script tags for cross domain, if the data in on the same domain as // this page, an HttpProxy would be better type: 'jsonp', url: 'http://www.sencha.com/forum/remote_topics/index.php', extraParams: { total: 50000 }, reader: { root: 'topics', totalProperty: 'totalCount' }, // sends single sort as multi parameter simpleSortMode: true }, sorters: [{ property: 'lastpost', direction: 'DESC' }] }); function renderTopic(value, p, record) { return Ext.String.format( '<a href="http://sencha.com/forum/showthread.php?t={2}" target="_blank">{0}</a>', value, record.data.forumtitle, record.getId(), record.data.forumid ); } var sm = Ext.create('Ext.selection.CheckboxModel'); var grid = Ext.create('Ext.grid.Panel', { width: 700, height: 500, title: 'checkbox', store: store, selModel: sm, frame: true, verticalScrollerType: 'paginggridscroller', loadMask: true, disableSelection: false, invalidateScrollerOnRefresh: false, viewConfig: { trackOver: false }, // grid columns columns:[{ id: 'topic', text: "Topic", dataIndex: 'title', flex: 1, renderer: renderTopic, sortable: false },{ text: "Author", dataIndex: 'author', width: 100, hidden: true, sortable: true },{ text: "Replies", dataIndex: 'replycount', align: 'center', width: 70, sortable: false },{ id: 'last', text: "Last Post", dataIndex: 'lastpost', width: 130, renderer: Ext.util.Format.dateRenderer('n/j/Y g:i A'), sortable: true }], renderTo: 'grid-example' }); // trigger the data store load store.guaranteeRange(0, 199);Ext checkbox的更多相关文章
- 基于Extjs的web表单设计器 第六节——界面框架设计
基于Extjs的web表单设计器 基于Extjs的web表单设计器 第一节 基于Extjs的web表单设计器 第二节——表单控件设计 基于Extjs的web表单设计器 第三节——控件拖放 基于Extj ...
- CodeSmith系列(三)——使用CodeSmith生成ASP.NET页面
仍然使用之前的XML文件,然后设置生成参数如下: 生成调整后的页面如下: 生成的代码如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ...
- Ext grid checkbox 分页 翻页 勾选 问题
timeArray = new Array(); //临时数组变量 var timeStatusBar = new Ext.ux.StatusBar({ id: 'statusbar', defaul ...
- [Ext JS 4] 实战之多选下拉单 (带checkbox)
前言 Ext js 创建一个多选下拉单的方式很简单, 使用Ext.form.ComboBox, 设置 multiSelect 为true 就可以了. 但是如果要在每个下拉之前加上一个checkbox, ...
- Ext.Net 1.x_Ext.Net.GridPanel嵌套Checkbox
解决办法:拼接HTML var tplchecked = '<input type="checkbox" {0}>'; var IsChecked = function ...
- Ext z自写checkbox
软件弹出框Exr.window里面有许多个CheckBox,用ext自带的CheckBoxGroup也可以实现,但是在后期处理的时候远没有自写的CheckBox灵活,还出了一些莫名其妙的bug 忍无可 ...
- [Irving] Ext.Net动态添加GridPanel列绑定Checkbox值失败的解决办法
var grid = X.GetCmp<GridPanel>(vm.GRID_QUOTATIONS_FEEITEM_RANGE_SHOW); grid.AddColumn(Html.X() ...
- ext.net 实现gridpanel checkbox锁定
<%@ Page Language="C#" %> <%@ Register Assembly="Ext.Net" Namespace=&qu ...
- Ext小总结
titleCollapse:true,//高级搜索点击隐藏显示 添加按钮 >弹出页面 1.添加按钮 //核销 在控制层页面添加页面路径>添加操作按钮>window.allOrder ...
随机推荐
- 【Linux】常用命令 lsof查看打开的文件
Linux系统把软硬件都抽象成文件,所以通过文件可以追踪到很多重要信息,如读取的配置文件.打开的端口等. 下面是常见的用法: 默认测试文件名为text.txt 1,显示打开text.txt的进程: l ...
- ios入门之c语言篇——基本函数——3——判断日期是一年的第几天
3.判断日期是一年的第几天 参数返回值解析: 参数: y:int,年份: m:int,月份 d:int,日期 返回值: sum:传入日期是当年的第几天: 函数解析: leapyear(y);判断y是不 ...
- 用expect实现自动输入SSH的SCP信息,且不需要另外的文件
#!/bin/sh ] ; then echo "USAGE: $0 remote_ip serverXXXXX" echo " e.g.: $0 1.2.3.4 ser ...
- Caption,Text,WindowText的区别——TControl也有FText,是为了模拟一个窗口
TControl = class(TComponent) // 控件的Windows功能从TControl开始 property Caption: TCaption read GetText writ ...
- 账户管理groupadd groupmod groupdel usermod usermod userdel
http://www.cnblogs.com/ggjucheng/archive/2012/08/21/2648380.html http://blog.csdn.net/qq1603013767/a ...
- C++ Primer 随笔 Chapter 13 复制控制
1.复制控制包含的内容:复制构造函数.赋值操作符.析构函数 2.复制构造函数: a. 定义:只有单个形参,而且该形参是对本类类型的引用,这样的构造函数被成为复制构造函数 b. 适用情况: (1)根据一 ...
- ♫【Backbone】this
Backbone.js Event Binding MyView = Backbone.View.extend({ events: { 'click .item': 'handleClick' }, ...
- 数据结构(线段树):CodeForces 85D Sum of Medians
D. Sum of Medians time limit per test 3 seconds memory limit per test 256 megabytes input standard i ...
- 获取Android设备屏幕分辨率
1.Android 4.3引入的wm工具: a.获取Android设备屏幕分辨率: adb shell wm size b.获取android设备屏幕密度: adb shell wm density ...
- Combinations ——LeetCode
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For exampl ...