Hello,
I wrote the code below for the new blazor grid to set cell values wrapping. But it can't show the language translated values of objects like Enums in listviews. How can i do this?
Thank you.
C#//....
foreach(var column in gridAdapter.GridDataColumnModels) {
if (column.FieldName != "Customer" && column.FieldName != "Customer.UserName") {
column.CellDisplayTemplate = CustomCellTemplate.Create();
}
}
Razor@using DevExpress.Blazor;
@using DevExpress.ExpressApp.DC;
<div class="d-block text-truncate" style="max-width: auto;">
@Context.DisplayText
</div>
@code {
[Parameter]
public GridDataColumnCellDisplayTemplateContext Context { get; set; }
public static RenderFragment<GridDataColumnCellDisplayTemplateContext> Create() {
return (GridDataColumnCellDisplayTemplateContext context) => @<CustomCellTemplate Context=@context />;
}
}