DataGrid 2 Snippets - define Data Source separately from properties - Mendix Forum

DataGrid 2 Snippets - define Data Source separately from properties

4

Problem: Maintenance of DG2 instances

 

DG2 has come a long way and it’s very powerful, but it can be difficult to maintain if used across multiple pages.

I’ve had multiple cases where a DataGrid 2 with the same properties (columns, filters, sorting options, etc.) needed to be used in different parts of the app, but with a different data source.

The only way to manage this currently is to copy and paste the DG2 and modify the data source. The problem is that maintaining this must be done in different places now, which is time-consuming and difficult to manage (e.g. changing one filter must be done in all instances).

 

Solution

It would be great if the properties of the DG2 (columns, filters, sorting options, styling, etc.) could be managed in a common space, like a snippet, with the data source separate from that.

 

This could be similar to how one might set this up using the Gallery or List View – placing the contents of the widget in a snippet and reusing that.

asked
0 answers