I have a Blazor DropDownDataGrid that to select a person with First Name and Last Name.
I find that If I have seperate columns for both the First and Last and type in text, the control searches both first and last for a match.
However, if I add a template to the dddg with the following:
@(Person_Singleton.FirstName + " " + Person_Singleton.LastName)
My question: How do I have a filterable dddg with a template? Thanks
This is my full component:
<RadzenDropDownDataGrid TValue="Person"
Context=person)
FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
AllowFiltering="true" AllowFilteringByAllStringColumns="true"
Data=@Data Value=@SelectedEntity
Visible=@Visible Disabled=@Disabled AllowClear=@BooleanHelper.Opposite(IsRequired)
Change=@(args => OnSelectionChanged(args)) Style="width:100%">
<Template Context=person>
@(person.FirstName + " " + person.LastName)
</Template>
<Columns>
<RadzenDropDownDataGridColumn>
<Template Context=person>
@(person.FirstName + " " + person.LastName)
</Template>
</RadzenDropDownDataGridColumn>
<RadzenDropDownDataGridColumn Property="FirstName" Title="First Name" Width="100px" Sortable="true" Filterable="true" />
<RadzenDropDownDataGridColumn Property="LastName" Title="Last Name" Width="100px" Sortable="true" Filterable="true" />
</Columns>
</RadzenDropDownDataGrid>