<RadzenDataList AllowPaging="true" Data="@customersData" TItem="Customer" PageSize="5" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true">
<Template Context="customer">
<RadzenCard Style="width: 100%; padding: 0; overflow: hidden;">
<div class="container">
<div class="row" style="margin-left: calc(var(--bs-gutter-x) * -1); margin-right: calc(var(--bs-gutter-x) * -1)">
<div class="col-lg-3 p-3 product-title">
<RadzenText TextStyle="TextStyle.H6" TagName="TagName.H5" Class="rz-color-secondary">Customer Name</RadzenText>
<RadzenText TextStyle="TextStyle.Body2" class="mb-sm-2 mb-lg-0">@(customer.CustomerName)</RadzenText>
<RadzenImage Path="@getImage(customer.Documents)" style="width: 40px; height: 40px; border-radius: 8px;"></RadzenImage>
</div>
C# side
IEnumerable customersData;
public string getImage(byte[] image)
{
if (image != null)
{
var base64 = Convert.ToBase64String(image);
var fs = string.Format("data:image/jpg;base64,{0}", base64);
return fs;
}
else
{
return "";
}
}
I have created a customer table with Documents column containing profile images in varbinary format in sql server. I am unable to see images but only blank images for all customers