zoukankan      html  css  js  c++  java
  • gridpanel 列中 renderer函数参数说明

    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 from 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 from which the Record was extracted.
        (数据源对象 就是Grid的store/ds)
    
    一共就是六个参数
  • 相关阅读:
    Java 课程设计:LWZ
    回溯法解骑士巡游问题
    2021.3.30 错误2
    2021.3.29 关于上下滚动
    2021.3.28 WebView的用法
    2021.3.27 关于错误1
    2021.3.26 Python创建表
    2021.3.25 人月神话阅读笔记06
    2021.3.24 个人作业第三阶段1
    2021.3.23 个人作业第三阶段
  • 原文地址:https://www.cnblogs.com/wugang/p/2746460.html
Copyright © 2011-2022 走看看