我有这个网格更改行的颜色(行内)
{
xtype: 'gridpanel',
id: 'grdSeguimiento',
margin: '20 0 10 0',
width: 1423,
store: 'Solicitud',
viewConfig: {
getRowClass: function(record, rowIndex, rowParams, store) {
console.log(record);
return record.data.get('TIEMPO') == 1 ? 'child-row' : 'adult-row';
},
stripeRows: false
},
columns: [
{
xtype: 'gridcolumn',
hidden: true,
dataIndex: 'TIEMPO',
hideable: false
}
],
plugins: [
{
ptype: 'rowediting',
listeners: {
edit: 'onRowEditingEdit'
}
}
]
}
而这个css文件
.child-row .x-grid-cell {
background-color: #ffe2e2 !important;
color: #900;
}
.adult-row .x-grid-cell {
background-color: #e2ffe2 !important;
color: #090;
}
我只是希望每个行具有基于值的颜色(TIEMPO)。
但我得到
Error: rendered block refreshed at 0 rows while BufferedRenderer view size is 63
网格使用的CSS文件之前,工作得很好。我做了一些研究,但找不到任何有用的东西。
上面的代码并不是所有的代码,我使用了渲染器和动作列,但我认为这并不重要。
任何想法?
编辑1:如果我更改了表的非可排序的数据,但似乎没有任何造型
'record.data.get('TIEMPO')'不起作用。您正在搜索'record.get('TIEMPO')'。 – Alexander