I am trying to display an image which is of type "Image" on RadzenImage. Is there a way we can achieve that? RadzenImage accepts path of type string. But I have the Image type and directly want to display the image. Is there a way we can do that?
Hi @korchev ,
I've tried also to use RadzenImage, but the expected result could not be reached.
My Code Stuff:
Customers
OnAddCustomer(_customerName))
ButtonStyle="ButtonStyle.Secondary"
Text="Add" Icon="person_add_alt"
Style="width: 150px" />
<RadzenButton Click=@(OnEditCustomer)
ButtonStyle="ButtonStyle.Secondary"
Text="Edit" Icon="manage_accounts"
Style="width: 150px"
Disabled="@_customerIsSelected" />
<RadzenButton ButtonStyle="ButtonStyle.Secondary"
Click=@(OnDeleteCustomer)
Disabled="@_customerIsSelected"
Icon="person_remove"
Style="width: 150px"
Text="Delete" />
</div>
<RadzenDataGrid @ref="CustomerGrid"
AllowFiltering="true"
AllowPaging="true"
PageSize="10"
AllowSorting="true"
Data="@_myCustomers"
TItem="Customer"
RowSelect="@(args => SelectedCustomer(args))"
SelectionMode="DataGridSelectionMode.Single">
<Columns>
<RadzenDataGridColumn Width="50px"
TItem="Customer"
Title="#"
Filterable="false" Sortable="true"
TextAlign="TextAlign.Center">
<Template Context="data">
@(data.Id)
</Template>
</RadzenDataGridColumn>
<RadzenDataGridColumn TItem="Customer"
Property="Customer.Name"
Title="Name"
Width="300px">
<Template Context="data">
<h5 class="mt-1 mb-0">@data.Name</h5>
</Template>
</RadzenDataGridColumn>
<RadzenDataGridColumn Width="160px" TItem="Customer" Property="CustomerSystems" Title="Customer Systems">
<Template Context="data">
<RadzenButton ButtonStyle="ButtonStyle.Info" Icon="info" Class="m-1" Click=@(() => ViewCustomer(data)) Text="View Systems" />
</Template>
</RadzenDataGridColumn>
</Columns>
and the Result on the Browser:
Any hint will be appreciated
Regards
Gilles
Sorry for the wrong Representation of the code stuff. I think i will be better to share a screenshot:
I could resolve the Issue:
I put the picture into the wwwroot path, and that's all