ExtJS data grid column renderer for multiple values

I am wondering if it is possible in ExtJS to have multiple data source values โ€‹โ€‹available for a column renderer. For example, in the "Actions" column, the identifier is passed to the visualizer. However, I need both user_id and id to be passed to the renderer. How can 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.

+7
javascript extjs
source share
1 answer

As far as I know, the renderer function has several parameters:

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

You can check docs for all parameters

+14
source share

All Articles