Reputation: 11
I have a requirement to add some HTML into the table cells so I am using TemplateColumn and CellTemplate to do this.
I have got sorting to work but how do I add filtering? At the moment it is not populating the dropdown lists.
When I was using PropertyColumn then filtering worked fine.
Filter icon shows default modal but empty drop down lists
<MudDataGrid T="Company" MultiSelection="true" Items="@companies" SortMode="SortMode.Multiple" Filterable="true"
Hideable="true">
<Columns>
<TemplateColumn Sortable="true" Filterable="true" SortBy="x => x.OrganisationName">
<HeaderTemplate>
Organisation
</HeaderTemplate>
<CellTemplate>
HTML here
</CellTemplate>
</TemplateColumn>
</Columns>
</MudDataGrid>
Upvotes: 1
Views: 594
Reputation: 1
When you use the TemplateColumn with CellTemplate you want to enable the filtering you need to also add the FilterTemplate
Upvotes: 0