Im using renderer function as below and want to hide/show specific checkcolumn-cells depending on variable record.data.hidden in my gridview.
{
xtype: 'checkcolumn',
renderer: function(value, metaData, record, rowIndex, colIndex, store, view) {
/*
if (record.data.hidden === true) {
// checkbox hidden
} else {
// checkbox shown
}
*/
},
itemId: 'mycheck',
bind: {
text: '{warranty}'
}
}
How do i do this?
You can use the
metaDatapassed to the renderer function to apply styling to the cell element, see the documentation here.One easy way is to set the
displayCSS property depending on your criteria. This will be applied to the HTML<td>element created by Ext JS for the cell.Try this:
(I am not sure about the right syntax, maybe you don't need the semicolon after
noneandtable-cell, and maybe you have to use quotations somewhere. Try it.)But you create a CSS style and use
tdClsas well, and perhaps alsotdAttrbut I am not sure about the latest.