Hi all,
New to Blazor and Web development in General, but using Blazor as a way to bridge the gap between my c# knowledge and the web.
Just wondering if anyone has any knowledge of being able to do a if inside a Grid Column The end goal i'm trying to achieve is if a value is contained within the the property of the CurrentRecord then a button will appear binding to a function, if no record appears then the cell would remain empty.
this is the code i'm bodged together
<TelerikGrid data="@Histories" height="600px" Pageable="true" PageSize="20" Sortable="true" Filterable="true">
<TelerikGridColumns>
<TelerikGridColumn Field="Casecode" />
<TelerikGridColumn Field="Historytext" />
<TelerikGridColumn Field="Createdate" Title="Create Date" />
<TelerikGridColumn>
<Template>
@{
CurrentRecord = context as CaseHistory;
if(CurrentRecord.Blobid > 0)
{
<TelerikButton>Open</TelerikButton>
}
}
</Template>
</TelerikGridColumn>
</TelerikGridColumns>
</TelerikGrid>
at the moment when i'm running the code the command brower is showing an error
Error: System.ArgumentNullException: Value cannot be null.
Parameter name: name
at System.Type.GetProperty(String name, BindingFlags bindingAttr)
at Telerik.Blazor.Components.Grid.TelerikGridFilterHeaderBase`1.get_PropInfo()
at Telerik.Blazor.Components.Grid.TelerikGridFilterHeaderBase`1.get_PropType()
at Telerik.Blazor.Components.Grid.TelerikGridFilterHeaderBase`1.get_PropTypeName()
at Telerik.Blazor.Components.Grid.TelerikGridFilterHeaderBase`1.ResetFilterText()
at Telerik.Blazor.Components.Grid.TelerikGridFilterHeaderBase`1.OnInit()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
any help to point me in a direction would help.
Thanks
Richard