Completed
Last Updated: 12 Mar 2020 09:19 by ADMIN
Valentyn
Created on: 17 Mar 2014 11:57
Category: Grid
Type: Feature Request
11
Make kendo grid cells customizable
Currently its possible to set static attributes or CSS classes to kendo grid columns by specifying then in column definition:

var columns = [{ field: 'someData', title: 'Some Data', attributes { 'class': 'some-css'} }];

Please add possibility to add custom attributes or CSS Classes dynamically (depending on data row):

var columns = [{ field: 'someData', title: 'Some Data', attributes { 'class': function(dataRow){ return dataRow.data > 1 ? 'css-go-up': 'css-go-down' }} }];

Just similar how it works with template for column.

Thanks,
Val
3 comments
ADMIN
Angel Petrov
Posted on: 12 Mar 2020 09:19

Hello,

Actually it is possible out to add a style without adding an additional element. Here is a dojo that illustrates this approach.

Regards,
Angel Petrov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Sean
Posted on: 25 Nov 2015 17:14
I agree, this would be amazingly useful! Having to nest a div inside each td in order to apply classes based on data makes me sad.
Ben
Posted on: 25 Nov 2015 17:12
Would be very helpful. We are porting existing custom conditional styling to kendo and would rather not be creating additional elements inside the table cells just to apply a class