I would like to prevent the grid cells from wrapping and increasing the row height.
Instead I just want the text to be cut off and ending with ellipsis. I tried styling with column classes "white-space: nowrap", but that does not work.
Is that possible?
Thank you!
2 Answers, 1 is accepted
0
Zornitsa
Telerik team
answered on 22 Feb 2024, 12:05 PM
Hi Gerald,
You are on the right track regarding the usage of the 'white-space: nowrap' CSS declaration to achieve the desired behavior. The mentioned styling should be applied to the Grid cells by using the following class selector:
.k-grid.k-table-td {
white-space: nowrap;
}
Here is also a StackBlitz example to better illustrate the approach:
I would like to achieve this result only for specific columns. Is that also possible?
BR,
Gerald
0
Zornitsa
Telerik team
answered on 27 Feb 2024, 08:50 AM
Hi Gerald,
The developer can apply the 'white-space: nowrap' CSS styling only for a specific column by using the style property of the corresponding ColumnComponent:
Alternatively, the approach from my previous reply can also be extended to achieve this behavior with the addition of setting a custom class to the particular column: