Extend Datagrid functionality in Mendix 8

Hello, We need to extends the datagrid functionality, we are using mendix 8 and cannot switch to mendix 9.  The user need to be able to hide and reorder columns of the datagrid. We also need to keep his setting (if he logs out, we keep the setting in the DB at the user level). Maybe I can add some javascript (in a javascript snippet, using mendix client) to display/ hide and reorder the column depending of the user setting. But even with that I will still be unable to let the user reorder and hide/show the columns. Do you know how we can achieve that?
2 answers

You will have to build a lot of javascript and invent the wheel. My advice would be: upgrade to Mx 9. Being able to upgrade or not is just a matter of costs, and you will be making a lot of costs building this functions and throwing that down the drain when you eventually do upgrade to Mx9. But you know all that already, so here goes some tips:

- Have a look at how datagrid2 constructs it personal-settings to store a user’s own settings. Copy that to Mx8. Your idea how to do this likely matches the datagrid2’s version;

- For drag and drop, try and implement this after document-ready: https://react-dnd.github.io/react-dnd or one of these https://react-dnd.github.io/react-dnd/examples/sortable/simple/;

- Saving the new setting after a drag-and-drop action is easiest done with a separate button on the page.

Hope it works out for you.



Indeed. Now that the LTS version of Mx9 has been released I would indeed suggest the upgrade path. Might be less work.