开发者

ExtJS Data Grid Column renderer to have multiple values

开发者 https://www.devze.com 2022-12-25 18:11 出处:网络
I am wo开发者_StackOverflow社区ndering if it is possible in ExtJS to have several values of the data source available to the renderer of the column. For example with the \"Actions\" column, the id is

I am wo开发者_StackOverflow社区ndering if it is possible in ExtJS to have several values of the data source available to the renderer of the column. For example with the "Actions" column, the id is passed to the renderer. However I require both the user_id and id passed to the render. How may I do this?

table_cols = [{
    header: "User ID",
    width: 30,
    sortable: true,
    dataIndex: 'user_id'
},
{
        header: "Actions",
        width: 60,
        sortable: false,
        dataIndex: 'id',
        renderer: function(val) {
               //IF USER ID MEETS A CONSTRAINT PRINT THE ID
         }
}];

Thanks.


As far as I know renderer function has several parameters:

     renderer: function(val, meta, record) {
           var userId = record.data.user_id;
     }

You can check the docs for all the parameters

0

精彩评论

暂无评论...
验证码 换一张
取 消