Ticket T1261790
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Pivot Grid control - The Prefilter API is hidden from IntelliSence and documentation

PivotGrid for WinForms - Prefilter not loading on new versions

created 4 months ago

Hello,

I'm using two versions of DevExpress, the v23.1.4 and v18.2.5.
I'm with a problem that when I try to Load a layout from XML in the PivotGridControl with prefilter from a different version, it doesn't work.

For example:

1 - In the v18.2.5, set a Prefilter to the PivotGridControl and save the layout to XML using "SaveLayoutToXml".
2 - Go to the v23.1.4 and restore the exact same PivotGridControl XML using "RestoreLayoutFromXml". The Prefilter will load blank.

If you do the reverse steps (save in the v23.1.4 and load on the v18.2.5) the same thing happens.
I've noticed that the versions save the Prefilter in a different way in the XML.

The v18.2.5 saves in the following way:

XML
<property name="Prefilter" isnull="true" iskey="true"> <property name="Criteria">~Xtra#Base64AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE4LjIsIFZlcnNpb249MTguMi41LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAJ0RldkV4cHJlc3MuRGF0YS5GaWx0ZXJpbmcuR3JvdXBPcGVyYXRvcgIAAAAIb3BlcmFuZHMMT3BlcmF0b3JUeXBlBAQ0RGV2RXhwcmVzcy5EYXRhLkZpbHRlcmluZy5Dcml0ZXJpYU9wZXJhdG9yQ29sbGVjdGlvbgIAAAArRGV2RXhwcmVzcy5EYXRhLkZpbHRlcmluZy5Hcm91cE9wZXJhdG9yVHlwZQIAAAACAAAACQMAAAAF/P///ytEZXZFeHByZXNzLkRhdGEuRmlsdGVyaW5nLkdyb3VwT3BlcmF0b3JUeXBlAQAAAAd2YWx1ZV9fAAgCAAAAAAAAAAUDAAAANERldkV4cHJlc3MuRGF0YS5GaWx0ZXJpbmcuQ3JpdGVyaWFPcGVyYXRvckNvbGxlY3Rpb24DAAAADUxpc3RgMStfaXRlbXMMTGlzdGAxK19zaXplD0xpc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mlsdGVyaW5nLkNyaXRlcmlhT3BlcmF0b3ICAAAACTQAAAAJNQAAAA0CBzAAAAAAAQAAAAQAAAAEKkRldkV4cHJlc3MuRGF0YS5GaWx0ZXJpbmcuQ3JpdGVyaWFPcGVyYXRvcgIAAAAJNgAAAAk3AAAADQIHMQAAAAABAAAABAAAAAQqRGV2RXhwcmVzcy5EYXRhLkZpbHRlcmluZy5Dcml0ZXJpYU9wZXJhdG9yAgAAAAk4AAAACTkAAAANAgE0AAAAHwAAAAY6AAAADU5vdmEgQ29sdW5hNjEBNQAAACAAAAAGOwAAAAhBZ3J1cGFkbwE2AAAAHwAAAAk6AAAAATcAAAAgAAAABj0AAAAIQXByb3ZhZGEBOAAAAB8AAAAJOgAAAAE5AAAAIAAAAAY/AAAACFZhbGlkYWRhCw==</property> <property name="ShowOperandTypeIcon">false</property> <property name="Enabled">true</property> </property>

The v23.1.4 saves the following way:

XML
<property name="Prefilter" isnull="true" iskey="true"> <property name="ShowOperandTypeIcon">false</property> <property name="Enabled">true</property> <property name="CriteriaString">Not Contains([pivotGridField22], 'free') And Not Contains([pivotGridField22], 'tulo agrupado') And (Contains([Nova Coluna61], 'Agrupado') Or Contains([Nova Coluna61], 'Aprovada') Or Contains([Nova Coluna61], 'Validada')) And Not Contains([pivotGridField22], 'INCOBRAVEL')</property> </property>

They both were saved with the exact same Prefilter.

The other things of the layout loads correctly, like columns index, sorting, etc.

Is there a way for me to load the Prefilter correctly in the v23.1.4 using the XML generated from the v18.2.5 in the PivotGridControl?

Thank you

Answers approved by DevExpress Support

created 4 months ago

Hi,

We introduced the following breaking change in v22.1.1: Pivot Grid control - The Prefilter API is hidden from IntelliSence and documentation. While it is technically possible to use the prefilter API in newer versions, it will not help because we removed corresponding properties from the serialization logic. The only option is to recreate layouts in a newer version and save them again.

Please let me know if you have additional questions.

Regards,
Alessandro

    Show previous comments (3)
    Alessandro (DevExpress Support) 4 months ago

      Hi,

      Try re-saving layouts in version v22.1.5. Then, they should work without any issues in v22.2.x and v23.x.y (see PivotGrid for WinForms - Filter is not set after RestoreLayout).

        Hello

        It worked using the v22.1.5

        Thank you

        Alessandro (DevExpress Support) 4 months ago

          Thank you for letting us know that the issue is resolved. Please feel free to contact us at any time.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.