How to set alignment of cells in Kendo grid after formatting it
18,616
You can achieve that using headerAttributes and Attributes property in the column description.
{
field: "n",
headerAttributes:{ style:"text-align:right"},
attributes:{ class:"text-right" } ,
//template: "<div style='text-align:right'>#= n #</div>",
format: "{0:n}", type: "number"
}
Please see the updated fiddle here
Author by
Nupur
Updated on June 11, 2022Comments
-
Nupur about 2 years
I am using Kendo grid in my project.
I am using culture script for internationalization.
Using that script it formats the numbers in grid depending upon culture I want to align the numbers to right, how can I achieve it?
-
David Clarke almost 4 yearsWorth a mention that class
text-right
is already defined in bootstrap.css, along withtext-left
,text-center
, etc.