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 ...
随机推荐
- 剖析并利用Visual Studio Code在Mac上编译、调试c#程序【转】
0x00 前言 一周多以前的微软的Build大会上,微软发布了一个让很多人眼前一亮的工具,也是本文的主角——Visual Studio Code.很多使用Windows的朋友都很高兴,认为又多了一个很 ...
- 关于git服务器的搭建
Git 服务器可搭建在多个系统平台上. 本篇以 Windows 和 Ubuntu 系统为例,简单介绍 Git 服务器的构建. 最后使用 eclipse 的 egit 插件和 git clone 这两种 ...
- int 和String之间的互转
int -> String int i=12345;String s="";第一种方法:s=i+"";第二种方法:s=String.valueOf(i); ...
- HDOJ(HDU) 2161 Primes(素数打表)
Problem Description Write a program to read in a list of integers and determine whether or not each ...
- 行为树(Behavior Tree)实践(1)– 基本概念
原文地址:http://www.360doc.com/content/15/0107/11/15099545_438831036.shtml 自从开博以来,每天都会关心一下博客的访问情况,看到一些朋友 ...
- bzoj 1560 [JSOI2009]火星藏宝图(DP)
1560: [JSOI2009]火星藏宝图 Time Limit: 10 Sec Memory Limit: 64 MBSubmit: 647 Solved: 309[Submit][Status ...
- HDU 1247
简单的字典树 - -,求一个单词是否由两个单词组成 #include<iostream> #include<cstring> #include<cstdio> us ...
- linux安装vnc
1. 安装vnc-server yum install vnc-server redhat的iso文件中自带 tigervnc-server 2.设置vnc密码 切换到oracle用户,之后再运行vn ...
- JavaScript使用需要注意的细节
1.JavaScript区分大小写 在JavaScript中对象,变量.函数都是区分大小写的,例如: Object表示对象,Arrary表示数组,而写成object,arrary的时候JavaScri ...
- c# MongoDB插入和批量插入,插入原理
在开发之前,选择MongoDb驱动是件很重要的事情.如果选择不好,在后期的开发的是件很费力的事情,因为我就遇到这样的问题.MongoDb驱动有几种比较流行驱动,官方驱动和samus是两种使用比较多的. ...