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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to initialize grid filter with GridOffice2007Filter?

Thread ID:

Created:

Updated:

Platform:

Replies:

96145 Aug 24,2010 11:12 AM UTC Sep 15,2010 05:45 AM UTC WinForms 5
loading
Tags: GridControl
Raphael
Asked On August 24, 2010 11:12 AM UTC

Hello,

I use a GridOffice2007Filter for a GridGrouping control.

I would like to initialize this filter by checking just 2 or 3 elements for a column (there are 5 elements).

Example : in the column, the elements are "Planned", "Closed", "Delay", "Not planned" and "On going" and I would like to initialize with "Planned", "Delay" and "On going".

Could you help me please?

Thanks in advance.

Sincerely,

Raphaël.

Jisha Joy [Syncfusion]
Replied On August 26, 2010 10:30 AM UTC

Hi Raphaël,

Thank you for using Syncfusion products.

You could achieve the desired behavior by allowing the filter only to the columns you want. See the code:

GridOffice2007Filter filter = new GridOffice2007Filter();
this.gridGroupingControl1.TableDescriptor.Columns["Planned"].AllowFilter = true;
this.gridGroupingControl1.TableDescriptor.Columns["Delay"].AllowFilter = true;
this.gridGroupingControl1.TableDescriptor.Columns["onGoing"].AllowFilter = true;
filter.WireGrid(this.gridGroupingControl1);

Regards,
Jisha

Raphael
Replied On August 26, 2010 12:15 PM UTC

Hi,

All right, so it is impossible in a specific column to initialize the element to filter?

Because "Planned, "On going",... are not columns but values in a specific column which name is "STATUS".

That is why I would like to check, at launch, those values in the filter for the column "STATUS" in order to have only the value "Planned", for example.

Nevertheless, the user can change the filter, after launch, and then check values unchecked in the filter for the specific column "STATUS", which are not visible at the beginning.

I don't know if I explain clearly... it is not easy.

Thanks in advance.

Sincerely,

Raphaël.

Jisha Joy [Syncfusion]
Replied On August 27, 2010 07:03 AM UTC

Hi,

You could achieve the desired behavior by using the RecordFilterDescriptor and specifying the required filter condition.

this.gridGroupingControl1.TableDescriptor.RecordFilters.Clear();
RecordFilterDescriptor filter1 = new RecordFilterDescriptor("[Col1] > 200"); this.gridGroupingControl1.TableDescriptor.RecordFilters.Add(filter1);


Regards,
Jisha

Raphael
Replied On September 14, 2010 07:26 AM UTC

Hello,

Indeed, it works!
Thank you very much for your help.

Have a nice day!

Sincerely,

Raphaël.


Christopher Issac Sunder K [Syncfusion]
Replied On September 15, 2010 05:45 AM UTC

Hi Raphaël,

Glad to know that the issue get resolved in your side.

Thank you for using Syncfusion products.

Regards,
Christo.


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

;