Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
How can I know if a filter in UltraGrid filtering?
posted

I want to know How can I know if the filter's textbox is empty or not?

I thought I could use "IsFilteredOut" but it's not the property I was looking for.

Thank you!

Parents
No Data
Reply
  • 8607
    Offline posted

    Hello dori greeny,

    You can use the FilterConditions property and check if it has a Count of 0.  If there are no FilterConditions, then the filter's textbox is empty.

    For example:

    if (this.UltraGrid1.DisplayLayout.Bands[0].ColumnFilters[0].FilterConditions.Count == 0)
    {
    // your logic here
    }

    You can change the Band and the ColumnFilters by adjusting the indices in the code above.


    Elizabeth Albert
    Localization Engineer 

Children