Show and hide columns in a datagrid

This code above is ready to use.

For example, you have the above code on a client module named “responsive”, and call it in your form with
from ... import responsive
or wherever your form is (start typing from and the editor will propose the path)
and use it as described:

self.objects_grid_responsive = ColumnsToShowHide_in_datagrid(self.objects_grid)

with self.objects_grid being a datagrid in your form

To deal with mobile or PC, I use this nice code:

1 Like