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 ...
随机推荐
- Kent Beck揭秘Facebook开发部署流程
http://www.infoq.com/cn/news/2013/10/facebook-development-deployment Facebook是世界上最大的社交网站,有超过10亿用户每月至 ...
- 火星02坐标转换为WGS84坐标
import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import jav ...
- BZOJ 2423 最长公共子序列
Description 字符序列的子序列是指从给定字符序列中随意地(不一定连续)去掉若干个字符(可能一个也不去掉)后所形成的字符序列.令给定的字符序列X=“x0,x1,…,xm-1”,序列Y=“y0, ...
- Facebook IV Winner's Interview: 1st place, Peter Best (aka fakeplastictrees)
Facebook IV Winner's Interview: 1st place, Peter Best (aka fakeplastictrees) Peter Best (aka fakepla ...
- Extjs打开window窗口自动加载html网页
Window inherits the autoLoad config option from Panel. Note that I included all config options below ...
- Catch That Cow
poj3278:http://poj.org/problem?id=3278 题意:给你一个n和k,n可以加1也可以减1,还可以乘2,现在要求n经过这样的几步变换可以使得n==k:求得最小的步数.题解 ...
- cf C. Fox and Box Accumulation
题意:输入一个n,然后输入n个数,问你可以划分多少个序列,序列为:其中一个数为c,在它的前面最多可以有c个数. 思路:先排序,然后对于每一个数逐步的找没有被用过的数,且这个数可以符合条件,然后如果没有 ...
- Delphi下的RTTI函数大全
http://ljz9425.blog.163.com/blog/static/369148572008111635253858/ Delphi下的RTTI(下) 2008-12-16 15:52:5 ...
- bzoj3531
不难想到树链剖分这题的难点是记录的是路径上宗教相同的点裸的想法是对每一种宗教都开一棵线段树,记录每个点的评级但显然这样会爆空间,仔细分析一下,这些线段树内很多点压根就没用到因此我们考虑对线段树动态开点 ...
- 实战weblogic集群之应用部署
一.创建应用发布目录,上传应用包. 1.在10.70.52.11-14的/app/sinova目录下建立applications目录(名称可以自定义),作为我们应用的发布目录. $ mkdir /ap ...