We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Filterbar issue

Hello,

we are using GGC 10.1.0.44 and have an issue with filterbars. We use filters based on rowdata as in your samples. When a user selects a filter value filtering is fine. But the data in the grid can be loaded corresponding to outer filters that directly work on the database side. If now data is relaoded we

1) want to keep the selected filter values on the grid
2) but we have to ensure that only items appear in the list that were actually loaded

I.e. there is a column with years. First I load it with data in 2012 and 2013 and filter with GGC to show 2012 only. Then I load the data again but only for 2012. Now I want to keep 2012 selected in the filter as it still applies to the loaded data. Then I load again but only 2013. Now the filter has to be removed.

We try to implement this by reading the current filter settings before loading data. And after loading we add the filters again. This works fine excepting that if a filter value is not in the loaded data it hides everything as it doesn't correspond to the filter and in addition it appears in the filter listbox where both shouldn't happen.

So what we would need is basically information of how we can detect if a filter value exists in the new filter listbox after loading. But the listbox seems to be empty until it is first opened.

How can we achieve this?

Thanks in advance,
Christian







1 Reply

VK Vinish Kumar K Syncfusion Team July 29, 2013 06:49 AM UTC

Hi Christian,

We have analyzed the reported query with our Filter source. in our source code we have maintain the dictionary collection for the filtered record. We have implemented this for the better performance in our filter.

 

Due to this the old records are maintain in excel filter dropdown, Based in  this architecture, the Table.FilteredRecords gives the unique records to show in Filters. If you have used large dataset in application. The performance of the ExcelFilter may be decreased. So we have implemented the new method to clear all filter if you have reset the datasource.

 

filter.ClearFilters(gridGroupingControl1);

 

Please reset the DataSource and clear the filer of the GGC using the above code. Please let me know if you need more information regarding this.

 

Thanks,

Vinish K


Loader.
Live Chat Icon For mobile
Up arrow icon