Save Default Filter in DataGrid 2 (Equal, not equal, contains etc)

2
Hey Mendixer,   is there a way to save the Default Filters in Datagrid 2 ? So when the User use the Equal Filter, the value should be saved  and when he/she comes back to the Page, the Equal Filter should be there again.   We already implemented that a User can save the Search Values & Column Width. Search Values can be saved by default Value. Column Width in the Tab Personalization → Configuration → Attribute.   In this Attribute is this string value : f   Would it maybe be possible to save the Default Filters somewhere here?   Best Regards
asked
4 answers
0

Hi all

 

Would also be interested in this resolution.

 

Very best

Luca

answered
0

 

Hi,

Data grid 2 support below JSON structure which has filters stored.

Hope this helps!

 

image.png

Grid_JSON.txt

 

{  "name": "dataGrid21",  "schemaVersion": 2,  "settingsHash": "1397710728",  "columns": [    {      "columnId": "0",      "hidden": false    },    {      "columnId": "10",      "hidden": false    }  ],  "columnFilters": [    [      "0",      [        "equal",        null,        null      ]    ],    [      "1",      [        "equal",        null,        null      ]    ],    [      "7",      [        "equal",        null,        null      ]    ],    [      "8",      [              ]    ],    [      "9",      [              ]    ],    [      "10",      [        "equal",        null,        null      ]    ]  ],  "groupFilters": [      ],  "sortOrder": [      ],  "columnOrder": [    "0",    "1",    "2",    "3",    "4",    "5",    "6",    "7",    "8",    "9",    "10"  ]}

 

You might need to upgrade the Data grid 2

 

Ashok

answered
0

Hi everyone,

 

I believe that creating additional attributes for each filter could be a solution for storing prefilled filters. Please refer to this video

Mendix Data Grid 2 Personalization by MendixMinutes

Hope it will be helpful.

 

Best regards,

Max.

answered
0

Maksym Honcharenko did a great job of answering the issue. 

 

If that's not good enough for you I would suggest you to try and have a persistent helper entity by which you can keep in the database the options. Then you feed the datagrid 2 filters from that entity. 

 

I believe you should not use this thought. Anything that can be configured at the level of the widget is a better solution also from my point of view

answered