In my app I require the ability to save a list of recordFilters (the user-applied ones). I looked at the Save/Load Customizations, but they include all of the grid settings and appear to have to be applied directly to the grid. Is there a way for me to serialize to xml just the list of RecordFilters that I have?
Thanks,
Chip
Hello Chip,
Thank you for your post. I have been looking into it and since this feature is currently not available I created a sample project for you with the functionality you want. Basically I used the SaveCustomization method to generate the xml and then used custom code to load only the filters. Since I found an issue with hierarchical data this will work only with flat data. I commented the code that should work with hierarchical data after our developers review this and try to fix it. I have logged this with development under ID: 172169 and I have also created a support ticket on your behalf: CAS-137596-Q9N5H1 and have linked the development issue to it, so that you can get automatically updated, when a Service Release containing the fix is available for download. You can get the new version from our website’s “My IG”, “My Keys & Downloads” tags: https://www.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
You can also monitor the support ticket’s progress through the “My Support Activity” tag: https://www.infragistics.com/Membership/MySupport.aspx
Thank you for your help, this works for what I need.
I have created a new sample for you, where I use my own logic to save and load the Record filters using xml. You can use this sample as basis for any further implementations I order to fulfill your requirements. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Thanks you for the code. Working fine.
After investigating this further, our developers said that the behavior where the child filters are not saved is by design. The reason for this behavior has to do with the fact that the XamDataGrid doesn't serialize out data, which would be required to identify the parent record context in this case.
However, if the FieldlayoutSettings.RecordFilterScope property is set to 'AllRecords' then the child filter criteria would apply to the children of all the parents and therefore the parent record context is not needed. Therefore, in this case the child filter criteria will be saved and loaded as expected.
This doesn't work for grouped conditions either.
It would be useful if you exposed a separate property from the grid to save/load filter XML (outside of the 'SaveCustomizations'), equivalent to DevExpress 'FilterString'.
Thanks.
Hello Howard,
After looking into this and doing some research, "Save the Recordfilters only" has been determined to be a new product idea. You can suggest new product ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com.
There are many benefits to submitting an product idea:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
Steps to create your idea:
The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Thank you for contacting Infragistics.