|
. . .
<SfButton OnClick="Filter" CssClass="e-primary" Content="Filter"></SfButton>
<SfGrid @ref="Grid" DataSource="@Orders" AllowFiltering="true" AllowPaging="true">
. . .
</SfGrid>
@code{
SfGrid<Order> Grid;
. . .
public void Filter()
{
// Show columns by its header text
this.Grid.FilterByColumn("CustomerID", "equal", "ALFKI");
}
}
<style>
//hided filterbar
.e-grid .e-filterbar {
display: none;
}
</style> |
Hi Keane,
Greetings from Syncfusion.
Query: Hide filter bar while still allowing filtering
We have validated your query and you want to hide the filter bar. You can achieve your requirement by using CSS. Find the below code snippets and sample for your reference.
[code snippets]
. . .<SfButton OnClick="Filter" CssClass="e-primary" Content="Filter"></SfButton>
<SfGrid @ref="Grid" DataSource="@Orders" AllowFiltering="true" AllowPaging="true">. . .</SfGrid>
@code{SfGrid<Order> Grid;. . .
public void Filter(){// Show columns by its header textthis.Grid.FilterByColumn("CustomerID", "equal", "ALFKI");}}
<style>//hided filterbar.e-grid .e-filterbar {display: none;}</style>
Please get back to us if you need further assistance.
Regards,Rahul