Preserving data grid column preferences when updating the data grid itself - Mendix Forum

Preserving data grid column preferences when updating the data grid itself

2

Saving data grid personalisation is a great feature, but if you alter the data grid from Mx studio, you reset all preferences however.


We currently have a grid with about 35 columns and a 1-* helper allowing you to save multiple variations of preferences for the same data grid. For example, a user can have grids for "All my projects, all my team projects, all my native app projects, all apps that were recently updated" and quickly switch between 'views'. This is a great feature, but if we as a developer change the data grid, all user preferences for this data grid get reset.


This obviously makes sense, because the JSON containing the preferences become invalid when we alter the columns in Studio. However, this can be very annoying for users. It would be very useful if Mendix would append/update the preference JSON strings appending the new/altered columns to the preferences while preserving all user settings here.


So far the only alternatives I have thought of are the following, but both aren't great or fail-safe.

  1. Implement data-grid versioning, where a user can select a Data grid Version and set preferences for each version. Each time a developer updates the data grid columns, the data grid should be duplicated and create a new 'version'. Basically we'd be duplicating the same data grid for each column configuration. This will be impossible to handle in the long run
  2. Alternatively, we could back-up all those JSON preferences and restore them after updating the application and afterwards automatically modifying them by appending/removing the changed columns. This would require a complex customized after-startup script each time we alter a specific datagrid we enabled personalisation on.


It would be very user-friendly if Mendix would support this out of the box.

asked
0 answers