Hi all
In my grid k-text-center and k-text-right are not working.
This is the column definition:
cols.Bound(c => c.id).Title("#").HeaderHtmlAttributes(new { @class = "k-text-center !k-justify-content-center" }).HtmlAttributes(new { @class = "k-text-right" });
as per this demo, but i still see the content (both header and column) align on left.
If i use .HtmlAttributes(new { style = "text-align: center" }); it works.
Checking the class I see the problem is the "text-align: inherit;" of k-grid class
Check the image named "Before":
And the image "After"
BR
Cristian
Hi Cristian,
Thank you for the images, code snippets, and details provided.
In order to ignore the inherent stylings and apply the right position of the content in a column, I would recommend using the following(as in the pointed demo):
columns.Bound(p => p.ShipName).HeaderHtmlAttributes(new { style = "text-align: center; justify-content: center" }) .HtmlAttributes(new { style = "text-align: right" });
Kind Regards,
Anton Mironov