I dont know if this is possible right now but according to documentation there is still no way how I could add classNames or styles by columns.
Currently what I could do is to create a custom formatter, however it will be much more easy if we could add classNames upon declaration.
In example:
//Columns definition
var columns = [
{
key: 'id',
name: 'ID',
locked : true,
classNames: 'center'
},
{
key: 'task',
name: 'Title',
width: 200
}
Hi, You should be able to use the cellClass property of a column to set the class. I will add this to the documentation
Is the cellClass also set on the header cell? Or is there another prop which can be used for this? I'm hoping to align right the cell text in columns with numeric data, but would also want to include the heading text.
Added PR #170 to add the cellClass value to the class of the header cells as well
Could cellClass default to the key?
Most helpful comment
Added PR #170 to add the
cellClassvalue to the class of the header cells as well