Multiple Default values within Data Grid 2 drop-down filter

0
Hi all,   is it possible to configure more than one default value within a drop-down filter in Data Grid 2? I activated the Multiselect flag (in drop-down filter), so that the user is able to filter for more than one value. In addition I would like to have a default filtering for more than one value.  Mendix Studio Pro Version: 9.12.8
asked
4 answers
3

I am using Mendix 9.24.2 and I you can do it by typing the caption in a string, splitted by comma


You can also try this and see if it works for you

answered
0

The answer is no

answered
0

I noticed it as well that this no longer seems to work. The funny thing is that when inspecting the code in github it seems there is some logic to render multiple default options.  See https://github.com/mendix/widgets-resources/blob/49a19f7cd27056d727cbb5b960bb0822e3841f32/packages/pluggableWidgets/datagrid-dropdown-filter-web/src/components/FilterComponent.tsx#L71

 

So after testing it another time, i get it to work, but then i broke it. So it seems that the behaviour is unclear to say the least.

 

Edit: I also tried setting the configuration of the drop-down filter and this also works very inconsistently. I think this might be related, is there someone who is able to use the stored attribute of a drop-down filter succesfully?

 

Edit2: I was able to bypass this by setting the configuration attribute of the whole datagrid on load of the page. This does make it a bit tricky as any changes to the datagrid also need to be made do the configuration attribute value as well, but for now this solves my problem. 

 

answered
0

Currently at v9.24.31.  We too are experiencing the same frustrations as mentioned here regarding DataGrid 2 filter default values not working.  We also found the related DataWidgets/ClientActivities JS actions for resetting and setting filter values are not functioning.

 

We found the DataGrid 2 Reset Filters module in the marketplace contributed by Hunter Koppen does a fine job of clearing all the filters.  Note: You must add a custom classname to the DG2 Appearance/Class property and use that as the target in the javascript action.  Using the Common/Name value does not work.

 

Perhaps Hunter's approach to clearing the filters might be adapted to setting their values as well, but I have not had the time to explore this.  Mendix's default implementation is obviously broken and UX suffers significantly.  We have not yet attempted to implement attribute storage of filter values as Pieter mentioned.  Typically we use the browser storage option, but we may need to change to attribute storage so we can programmatically control clearing and setting default filter values.

 

 

 

 

 

 

answered