我不确定第一栏的功能用例。不过,您可以通过将其添加到列定义来实现此目的,如下所示。
var gridOptions = {
// define grid columns
columnDefs: [
// using default ColDef
{
headerName: ' ',
field: '__',
width: 15,
sortable: false,
cellStyle: {
// you can use either came case or dashes, the grid converts to whats needed
backgroundColor: 'lightgrey', // whatever cell color you want
},
},
...
}
在这里创建了工作样本plnkr。