Hi Chaffois Quentin,
In EJ2 Grid, the WrapText option controls whether text
within cells should wrap to multiple lines or remain in a single line within
all columns without distinction.
However, to achieve different wrapping behavior for
different columns, you can use the custom styles by setting the “customAttributes”
property for the required column and you could use “white-space: normal” to
allow text wrapping for specific columns. This way, only the columns with this
style will have text wrapping while others will behave normally.
|
col.Field("ShipCity").HeaderText("Ship City").CustomAttributes(new { @class = "e-attr" }).Width("150").Add();
[style]
.e-grid .e-row .e-rowcell.e-attr {
height: Auto;
line-height: 18px;
overflow-wrap: break-word;
text-overflow: clip;
white-space: normal;
word-wrap: break-word;
}
|
https://ej2.syncfusion.com/aspnetmvc/documentation/grid/cell/cell#custom-attributes
Regards,
Pavithra S