Hide filter bar while still allowing filtering
I need to pull the filtering parameters into their own separate controls so that I have more direct access to them instead of using the filter bar and since FilterByColumn requires AllowFiltering to be true which by default shows the filter bar I was wondering if there was any way to hide the filter bar controls.
SIGN IN To post a reply.
3 Replies
RN
Rahul Narayanasamy
Syncfusion Team
March 25, 2020 10:23 AM UTC
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 text
this.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
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
Hi Rahul,
Your suggestion works great. Thank you for your help
Best regards,
-Vannak
RN
Rahul Narayanasamy
Syncfusion Team
October 22, 2020 05:09 AM UTC
Hi Vannak,
Thanks for the update.
We are happy to hear that the provided solution helpful to achieve your requirement.
Please get back to us if you need further assistance.
Regards,
Rahul
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
KK Keane Kaiser
- Mar 24, 2020 11:52 PM UTC
- Oct 22, 2020 05:09 AM UTC