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
210
ultragrid multiple filters slow
posted

Hi all,

Describing the problem is a bit hard, i hope i will make myself clear...

i have a special need:

We are using UltraWinGrid.UltraGrid control that holds up to 50,000 records simultaneously.

We want to use the filters abilities that the grid offers. I would like to offer my users an ability to define multiple filters definitions and save them in order to reload them and compare their results.

For example: Defining "Filter_1" - column1 bigger than 100

                  Defining "Filter_2" - column2 smaller than 50 and column3 bigger than 60

I can define each filter and apply it separately on the grid. But i would like to show my user a short summary before displaying the grid that will summerize the number of results per each Filter.

i wanted to add a list box that will show the following information:

Filter_1 (10,234 items)

Filter_2 (32,000 items)

etc.

The only way I've found of doing that is to perform one of the following:

1. Either go through each row and check if the row meets criteria for each filter defined ("Filter_1", "Filter_2") and save counters for the filters.

2. Load the grid with all 50,000 records then apply each filter and save Rows.Count result for each filter.

Both of them are taking a lot of time. I have tested it and using 5 different filters definitions (Filter_1, Filter_2, etc.) takes something like 7 seconds.

This is not applicable for my application, too slow.

is there a faster way to accomplish that? what is the right way for using them?

Thanks in advance,

Shay