Completed
Last Updated: 13 Mar 2020 09:46 by ADMIN
Jeffrey
Created on: 13 Feb 2012 07:24
Category: Grid
Type: Feature Request
6
Adding custom css setting for column in kendoGrid
It's a common scenario to set custom css on <td> for specific column, for example, using columns: { field: "ScoreNumber", css: "right-align", title: "Score" } to get <td class='right-align'>, then I can make every every score field text-align: right.

Maybe adjusting _tmpl: in Grid Widget as 
rowTemplate += "<td" + (column.css ? " class='" + column.css + "'" : "") + ">"; is a easy way to accomplish it.
2 comments
Vadim
Posted on: 25 Oct 2013 09:15
http://docs.kendoui.com/api/web/grid#configuration-columns.attributes
Vadim
Posted on: 25 Oct 2013 09:14
You can accomplish that by:

columns: [
  {
     field: "ScoreNumber", 
     attributes: { "class": "score-cell"},
     ....
  }, ...