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.

Save grid filters in bookmark

Thread ID:

Created:

Updated:

Platform:

Replies:

68870 Oct 4,2007 03:22 AM Jan 23,2009 11:52 AM ASP.NET Web Forms (Classic) 4
loading
Tags: GridGroupingControl
Frederic Ledain
Asked On October 4, 2007 03:22 AM

Hi.

I would like to know how I could easily save grid filters, so I can restore them later, as in a save/load bookmark model.

The user would select rows by adding one or more filters on several columns (in conjunction with boolean operators). The grid filters could be saved, and restored later, when the user connects again.

I am using C#, ASP.NET, GridGroupingControl.

Any help would be appreciated.

Regards,

Fred

Rajarajeswari S [Syncfusion]
Replied On October 8, 2007 01:51 AM



Hi Fred,

Thanks for evaluating Syncfusion products,

Your Direct Trac Incident has been updated. Please follow this issue in the incident id-37997

Regards,
S.Rajarajeswari


Mar Taloma
Replied On December 17, 2008 01:03 PM

has this been resolved?

i also would like to save the filter information entered by the user.thanks.


Rajarajeswari S [Syncfusion]
Replied On December 18, 2008 05:04 AM

Hi,

Thanks for evaluating Syncfusion products.

You can access the GridRecordFilters collection to get the current filters along with there expression text. Use the following code snippet to achieve this,

GridRecordFilterDescriptorCollection rec = this.GridGroupingControl1.TableDescriptor.GridRecordFilters;

Then you can browse through the collection data and save the details which relates with the filtering.

- > "rec[0].Conditions" - Conditions collections for the first record of data in the filters.
Other details associated with Conditions collection,

rec[0].Conditions[0].CompareText
rec[0].Conditions[0].CompareOperator
rec[0].Conditions[0].CustomFilter

A sample code snippet that you would use for adding filters through code,

GridRecordFilterDescriptor gfd = new GridRecordFilterDescriptor();
gfd.Name = "Country";
gfd.Conditions.Add(Syncfusion.Grouping.FilterCompareOperator.Equals, "Germany");
this.GridGroupingControl1.TableDescriptor.GridRecordFilters.Add(gfd);

You can save these collection data in an external file or datasource. Then use them back again.

Please let me know if this helps you out.

Thanks,
Raji



Mar Taloma
Replied On January 23, 2009 11:52 AM

just bought the product and quite new at this. can you please share a code snippet to loop thru all the columns of the grid as it is possible that the user can set filters on more than one column.

question:
is there a plan to add a grid-filter option to allow saving of the grid filter(s) between postbacks?

thanks again.


>Hi,

Thanks for evaluating Syncfusion products.

You can access the GridRecordFilters collection to get the current filters along with there expression text. Use the following code snippet to achieve this,

GridRecordFilterDescriptorCollection rec = this.GridGroupingControl1.TableDescriptor.GridRecordFilters;

Then you can browse through the collection data and save the details which relates with the filtering.

- > "rec[0].Conditions" - Conditions collections for the first record of data in the filters.
Other details associated with Conditions collection,

rec[0].Conditions[0].CompareText
rec[0].Conditions[0].CompareOperator
rec[0].Conditions[0].CustomFilter

A sample code snippet that you would use for adding filters through code,

GridRecordFilterDescriptor gfd = new GridRecordFilterDescriptor();
gfd.Name = "Country";
gfd.Conditions.Add(Syncfusion.Grouping.FilterCompareOperator.Equals, "Germany");
this.GridGroupingControl1.TableDescriptor.GridRecordFilters.Add(gfd);

You can save these collection data in an external file or datasource. Then use them back again.

Please let me know if this helps you out.

Thanks,
Raji





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.

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.

;