Is it possible to change the alignment of items per cell rather than for the entire grid?

1 Answer 111 Views
GridLayout
David
Top achievements
Rank 3
Iron
Iron
Veteran
David asked on 01 Dec 2021, 06:44 PM
For example, I want the items in the upper left cell to be horizontal centered. But I want the items in the upper right cell to be horizontal aligned left. Is something like this possible without using custom css?

1 Answer, 1 is accepted

Sort by
1
Accepted
Marin Bratanov
Telerik team
answered on 01 Dec 2021, 07:46 PM

Hi David,

One option is to use the TextAlign of the grid columns: https://docs.telerik.com/blazor-ui/components/grid/columns/bound#appearance

Alternatively, you can use the OnCellRener event and add a Class to the desired columns through it, and change the alignment with CSS.

Depending on which elements you want to alter, you may still have to use some CSS, you can read more here.

Regards,
Marin Bratanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
GridLayout
Asked by
David
Top achievements
Rank 3
Iron
Iron
Veteran
Answers by
Marin Bratanov
Telerik team
Share this question
or