Toggle filter bar

Hi,

Is it possible ot toggle the autofilter bar on the Grid?

I would like to let user decide if they need to see the filter bar. So at click of a button, i need Autofilter bar to be visible or vice versa.

Please advice.

Thanks,
Navin


1 Reply

SN Sridhar N Syncfusion Team May 24, 2011 09:51 AM UTC

Hi Navin,

Thanks for your interest in Syncfusion products.

Query #1"Is it possible ot toggle the autofilter bar on the Grid?"

Your requirement can be achieved by setting the property ShowFilterBar in button click event for toggling. Please refer the below code snippet.

[Codebehind - C#]

protected void Filter_Click(object sender, EventArgs e)
{
if (this.GridGroupingControl1.TopLevelGroupOptions.ShowFilterBar)
this.GridGroupingControl1.TopLevelGroupOptions.ShowFilterBar = false;
else
this.GridGroupingControl1.TopLevelGroupOptions.ShowFilterBar = true;
}



For your convenience, we have created sample and the same can be downloaded from the following link.

Filter Toggle203203708.zip

Please let me know if you have any other questions or concerns.

Regards,
Sridhar.N


Loader.
Up arrow icon