打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Ext中renderer用法及参数




setHeader是设置http恳求的头是MIME 和谈的拓展可以实现以下功能

Ext中 renderer一般用于Grid中对列模型的衬着上 其具体信息记录在 Ext.grid.ColumnModel 中的setRenderer( Number col, Function fn ) 办法里

一、col : Number
The column index
二、fn : Function
The function to use to process the cell""s raw data to return HTML markup for the grid view. The render function is called with the following parameters:
1、value : Object
The data value for the cell.(单位格的值)
2、metadata : Object
An object in which you may set the following attributes一个可以设置下边两个属性的对象)
**css : String
A CSS class name to add to the cell""s TD element.
(给单位格的TD元素设置CSS的class名称)
**attr : String
An HTML attribute definition string to apply to the data container element within the table cell (e.g. ""style="color:red;""").
(给单位格元素增长一个html的属性)
3、record : Ext.data.record
The Ext.data.Record which the data was extracted.
(该字段地点行对应的Ext.data.Record对象(整笔记录))
4、rowIndex : Number
Row index(行号)
5、colIndex : Number
Column index(列号)
6、store : Ext.data.Store
The Ext.data.Store object which the Record was extracted.
(数据源对象就是Grid的store/ds)
一共就是六个参数


renderer:function(value, cellmeta, record, rowIndex, columnIndex, store){

}
1.value是当前单位格的值
2.cellmeta里保存的是cellId单位格id,id是列号,css是这个单位格的css样式。
3.record是所在行数据,你想要什么,record.data["id"]就获得了。
4.rowIndex是行号,不是从头往下数的意思,而是分页后的成果。
5.columnIndex列号。
6.store,这个是你创建表格时辰传递的ds,也就是说表格里所有的数据,你都可以随便调用,  
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
ExtJS Grid Tooltip的3+1种实现方式总结
extjs grid renderer用法
extaspnet 的grid如何禁止选中某些行
grid中不显示左侧的复选框
extjs的EditorGridPanel中的ComboBox列中显示值的问题
Extjs 下拉grid
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服