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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

FilterBar filter overwrites DefaultView''s RowFilter

Thread ID:

Created:

Updated:

Platform:

Replies:

20926 Oct 28,2004 07:03 AM UTC Oct 29,2004 04:22 AM UTC WinForms 4
loading
Tags: GridControl
Alex Brunner
Asked On October 28, 2004 07:03 AM UTC

I have a grid bound to a DataTable having a specific filter defined on the DefaultView. The grid is having a FilterBar on top. If I now change the filter using the FilterBar my existing filter will be overwritten. Is there a chance to reapply my specific filter in conjunction with the FilterBar filter? Or, is there an event firing when the filter is changed by the FilterBar? Any advice would greatly be appreciated. Thanks in advance. Regards, Alex

Administrator [Syncfusion]
Replied On October 28, 2004 07:14 AM UTC

What version of our library are you using? 2.1.0.9 will allow you to use a DataView with its RowFilter property set as a datasource for the grid. But if you want to change the DataView.RowFilter after the filterbar has been wired, you will have to unwire the filterbar, change the DataView.RowFilter, and then rewire it.

Administrator [Syncfusion]
Replied On October 28, 2004 10:10 AM UTC

We are using 2.1.0.9. So as far as I can see, we cannot reapply our filter after the filterbar has set its filter. Isn''t there a possibility like an event firing giving me a point to concatenate my filter with the filter generated by the filterbar? Regards, Alex

Administrator [Syncfusion]
Replied On October 28, 2004 12:20 PM UTC

>>So as far as I can see, we cannot reapply our filter after the filterbar has set its filter. If you set this.grid.DataSource = this.dataView1 where already has your filter is already set when you call filterBar.WireGrid, then you should not have to reapply it. It should be maintained by the FilterBar. But if you do want to do it this way, then you can try to use the filterBar.RowFilterChanged event to set it. Here is a little sample. It maintains the filter [col1] > 4 even as you use the filter bar to apply other filters. FilterBarDataView_2503.zip Here is another sample you might be interested in. It sows how you can save filter across wiring and unwiring the grid which you may want to do if you reload data in your grid. Here is a sample showing one way you can persist filters through UnWire/Wire calls. FilterBarSample_6054.zip

Alex Brunner
Replied On October 29, 2004 04:22 AM UTC

Hi Clay This solved my problem. Thanks a lot for your support. Regards, Alex >>>So as far as I can see, we cannot reapply our filter after the filterbar has set its filter. > >If you set this.grid.DataSource = this.dataView1 where already has your filter is already set when you call filterBar.WireGrid, then you should not have to reapply it. It should be maintained by the FilterBar. > >But if you do want to do it this way, then you can try to use the filterBar.RowFilterChanged event to set it. Here is a little sample. It maintains the filter [col1] > 4 even as you use the filter bar to apply other filters. > >FilterBarDataView_2503.zip > >Here is another sample you might be interested in. It sows how you can save filter across wiring and unwiring the grid which you may want to do if you reload data in your grid. > >Here is a sample showing one way you can persist filters through UnWire/Wire calls. > >FilterBarSample_6054.zip > > > >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;