I am using ng-grid and I have a database that contains a column with rgb values such as #fc3b25, etc. I need to set the background color of each cell in the rgb column to the value contained in the database. In the libraryGrid, I have defined the columnDes as follows:
{
field: 'rgb',
displayName: 'Key',
width: '50px',
cellTemplate: "<div style='height:60px; width:50px; background-color: {{ row.getProperty('rgb') }} ;' >rgb</div>"
}
This does not work. It seems that a directive might be appropriate here, but I haven't had any success there either. Any suggestions?