位置: 编程技术 - 正文

ExtJS下grid的一些属性说明(expand.grid函数)

编辑:rootadmin
1.界面修改(css style): Extjs中界面风格与我们产品本身的风格有很大不同,从边框、选中行的颜色到鼠标移动到的行的颜色、菜单等,几乎都不同。Extjs对这些样式的设置都是由css完成的。如: 选中行的颜色就可用如下设置完成: .x-grid3-row-selected{background:#c6e2ff!important;} 其他的都类似,只要找到对应的class, 然后设置要修改的部分即可。 2. 属性的作用(About Ext.grid. GroupingView, EditorGridPanel): Extjs的grid功能强大,如排序、隐藏列或移动列等,这些都有一些属性与其对应,可以选择要还是不要。其中一些的属性和其作用如下: *. EditorGridPanel: border: false, //grid的边界 autoHeight: true, //grid的高度是否要用指定的高度 enableColumnMove: false, //grid的列是否可以移动 enableHdMenu: false, //在列的header是否要有下拉菜单 trackMouseOver: true, //当鼠标移过行时,行是否要highlight stripeRows: true, //让grid相邻两行背景色不同 *. GroupingView: 在要显示的数据中,根据它们的某个数据点进行分组,分组显示。这个数据点由*.GroupingStore中的groupField决定。*.GroupingView设置这个分组显示的grid的一些关于组的显示属性。如: forceFit:true, //是否根据grid的宽度调整列的宽度,防止水平scrollbar的出现 enableGroupingMenu: false, //控制header的下拉菜单中是否有group的选项(Group By This Field, Show in Groups(checkbox)) showGroupName: true, //用来分组的数据点这一列的header是否要随group name一起显示 hideGroupedColumn: true, //用来分组的数据点这一列是否要显示 startCollapsed: false, //一开始进到grid这页,它的group是合起还是展开 scrollOffset: -1, //为垂直的scrollbar留下的space(默认是px) 3.在单元格中添加图片: 在Ext.grid.ColumnModel中对应于加图片的列,用它的render链接到一个函数进行添加。如: var colModel = new Ext.grid.ColumnModel([ {header:”com”, render: AddImgs.createDelegate(this)}, {header:”test”, width:, sortable:false} ]); 响应函数如下: AddImgs = function(value,p,record){ if(record.data.descrip != "") { p.attr='ext:qtip="Add to playlist" style="background-image:url(/imgs/icn_view.gif) !important; background-position: center 2px; background-repeat: no-repeat;cursor: pointer;"'; } } 函数中的record.data是grid的数据,而着色的就是要添加的图片的路径和图片名。 4.当显示内容的字数超过单元格可以显示的字数时,如何让其自动换行(how to wrap text when the length of characters is more than the width of the column): 设置这些单元格的所用类的css即可。 如: .x-grid3-cell-inner{ white-space:normal; overflow:visible; } 需要注意的是:overflow的默认值是hidden. 当加上white-space之后,本来wrap就可以了,但是单元格的高度还是一行的高度,所以数据除了第一行,其它都看不到。只有把overflow的值改为visible后,单元格所在行的高度才会随着数据的行数而调整。 5.当一开始进入页面时,让所有的group除了第一个group展开(collapsed)外,其它的group都合上(folded): 首先通过设置属性startCollapsed让所有group都合上: startCollapsed:true; 然后在store.load({callback: function(records,o,s) {ToggleFirstGroup();} })中调用函数把第一个group展开: //gridView是该grid所用的view, 如(var gv = new Ext.grid.GroupingView({});). 6.date format: 数据为9// 1).这种format的结果是:Web Sep :: UTC+ { header: dHeader, width: , sortable: true, dateFormat: 'Y-m-d', //dateFormat是'm/d/Y'的话,得到的结果一样 dataIndex: 'date' }, 2). 这种format的结果是: -- { header: dHeader, width: , sortable: true, renderer: Ext.util.Format.dateRenderer('Y-m-d'), //format是'm/d/Y',结果是”//” dataIndex: 'date' }, 找到的一些关于Class Date的format及其输出的描述( **************************** Format Output Description ------ ---------- -------------------------------------------------------------- d Day of the month, 2 digits with leading zeros D Wed A textual representation of a day, three letters j Day of the month without leading zeros l Wednesday A full textual representation of the day of the week S th English ordinal day of month suffix, 2 chars (use with j) w 3 Numeric representation of the day of the week z 9 The julian date, or day of the year (0-) W ISO- 2-digit week number of year, weeks starting on Monday (-) F January A full textual representation of the month m Numeric representation of a month, with leading zeros M Jan Month name abbreviation, three letters n 1 Numeric representation of a month, without leading zeros t Number of days in the given month L 0 Whether it's a leap year (1 if it is a leap year, else 0) Y A full numeric representation of a year, 4 digits y A two digit representation of a year a pm Lowercase Ante meridiem and Post meridiem A PM Uppercase Ante meridiem and Post meridiem g 3 -hour format of an hour without leading zeros G -hour format of an hour without leading zeros h -hour format of an hour with leading zeros H -hour format of an hour with leading zeros i Minutes with leading zeros s Seconds, with leading zeros O - Difference to Greenwich time (GMT) in hours T CST Timezone setting of the machine running the code Z - Timezone offset in seconds (negative if west of UTC, positive if east) ********************************** 下面是一些format的格式及其对应结果:数据同上,用renderer: Ext.util.Format.dateRenderer(format) “Y-m-d” --> -- “y-m-d” --> -- “F j, Y” --> September , “F j, y” --> September , “F j, Y, g:i A” --> September , , : AM

推荐整理分享ExtJS下grid的一些属性说明(expand.grid函数),希望有所帮助,仅作参考,欢迎阅读内容。

ExtJS下grid的一些属性说明(expand.grid函数)

文章相关热门搜索词:expand.grid函数,ext.grid,ext.grid.editorgridpanel,ext.grid.gridpanel,ext.grid.editorgridpanel,ext.grid.panel,ext.grid.panel,ext.grid,内容如对您有帮助,希望把文章链接给更多的朋友!

extJs 常用到的增,删,改,查操作代码 %@pagelanguage="java"import="java.util.*"pageEncoding="UTF-8"%htmlheadtitleextJs中常用到的增删改查操作的示例代码/title!--CommonJs.jsp为ExtJS引入的路径--%@includefile="../extJs/Co

Extjs学习笔记之一 初识Extjs之MessageBox 在其中新建一个my目录,以后所有的样例文件都新建在这个目录中。1.Helloworld!先看一个Extjs版的HelloWorld网页的全部代码:htmlheadtitleExtjsMessageBox/titlelinkrel

Extjs学习笔记之二 初识Extjs之Form Extjs中的表单组件是Ext.form.BasicForm,不过最简单最常用的是Ext.form.FormPanel控件,它继承自Panel,具有一定的界面显示控制能力,它其中包含着一个BasicForm

标签: expand.grid函数

本文链接地址:https://www.jiuchutong.com/biancheng/370218.html 转载请保留说明!

上一篇:extJs 文本框后面加上说明文字+下拉列表选中值后触发事件(文本框后缀)

下一篇:EXT中xtype的含义分析(exceltype函数的用法)

  • 行政事业单位转账至个人账户条例
  • 城市基础设施配套费减免
  • 调研费用怎么写
  • 政府回购安置房几种模式
  • 印花税申报减免额不能为0怎么报
  • 小规模纳税人印花税怎样计算
  • 公关费用明细表
  • 自建房屋房产税纳税义务发生时间
  • 节税租赁和销售的区别
  • 开票金额和实际金额不一致
  • 支付的水电费属于什么会计科目
  • 一般纳税人要交的税种有几种
  • 营改增后发票上必须要开具税收分类编码吗?
  • 领购增值税专用发票
  • 哪些项目可以不报建
  • 未达起征点可以开增值税专票吗
  • 电子发票字体不同
  • 当月计提当月缴纳的增值税还用结转吗
  • 管理费用劳务费现金流
  • 购入的会计分录怎么写
  • 1697510003
  • 事业单位财政拨款是什么意思
  • 如何关闭edge浏览器下载保护
  • 华为鸿蒙系统耗电量快吗
  • 土地价款扣除会计分录
  • w10系统安装office
  • php date_diff
  • 个人转让股权如何缴纳个人所得税税率
  • php的教程
  • php目录结构
  • 公司分立土地涉税问题
  • 期初在产品成本是什么
  • 房屋权属变更什么意思
  • thinkphp 部署
  • 姆科马齐国家公园
  • php实现留言板功能
  • 冲红的销项税怎么结转
  • 入库税款异常怎么处理
  • 邮寄的发票对方没收到怎么办
  • 增值税发票有什么用途和作用
  • 个人独资企业取名规则
  • 承兑汇票贴现利率是怎么算
  • 企业发生销售退回时,不论销售退回的商品
  • 可转债公允价值评估
  • 运输行业一般纳税人开普票税率是多少
  • 企业研发费用资本化相关公司
  • 发票上盖成财务章了怎么办
  • 残保金是计入管理费用还是?
  • 以前年度损益调整
  • 资产负债表是怎么核对的
  • 小规模纳税人和一般纳税人的界定标准
  • 设计服务内容是什么
  • 科目汇总表借方和贷方相等吗
  • 开会旅游的费用是多少
  • 两个公司的出纳怎么分账
  • 计提应付票据利息10000的会计分录
  • 暂估入库结转成本
  • 上期留抵税额可以留多久
  • 企业建账目的
  • haproxy教程
  • 无法安装mysql数据库
  • win10右键自动弹出
  • fedora lts
  • centos中用户的基本属性
  • win7如何设置鼠标
  • win10双击应用程序没反应
  • Linux操作系统网络及主机名配置
  • gcc编译选项详解
  • cocos2dx webview
  • react常用框架
  • node.js使用教程
  • jquery转dom
  • 文本框几种常用属性
  • 浅谈关于混合模式教学的看法
  • jquery.form.js下载
  • shell脚本clear
  • python怎么处理json数据
  • 黑龙江省国家税务局通用定额发票
  • 深圳城管局 局长
  • 新一轮税制改革的背景是什么
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设