New functionality in data grids?

4
I see in the new v3.2.0 release notes there is an entry: Tickets 11027, 11063: Added possibility to use horizontal and vertical scrollbars on the data grid contents. Looking at a datagrid in the modeler I do not see any additional property controls - is there any documentation on how this new functionality is set up? Edit: Daniel, yes of course I've tried it! Here is a form using the default settings: After adding .tundra .wideGrid .mendixDataGrid_tableWrapper { width: 3000px; } I get the following layout: Notice the scroll bar has been added at the bottom of the section, not within the data grid or even at the bottom of the grid. Also notice top-right of the grid the Search/Reset buttons have been shifted off the visible canvas. What we want to achieve is not to resize the overall grid width, but to be able to scroll the columns in the table as shown here: To do this I would assume we need to be able to set the display width of each column, not as a percentage, but as a number of pixels. Edit after comment: Yes, my data grid is in a data view, inside a tab container, which is inside a table to maintain the layout (the line at the bottom giving user name, login, server name and Mx version is incorrectly rendered at the top of the page in v 3.x without the table. This only happens for this form which is the application Start page - that's probably another small bug) If I move the data view with the data grid out of the table/tab then the scroll bar is below the table instead of below the whole section, but the table header elements are also still expanded off the viewable area. In this image the top grid is not in a table and not in a tab container. Notice the scrollbar is below the whole grid, not the contents, and the header area has been expanded off the screen as shown by the red arrow. I will file a bug referencing this thread The Green arrow shows the mis-placement of the Username/version element which in the Modeler is placed below the tabbed pages, not above them. More info: I have tested with a data grid only, and the scrollbar is indeed rendered correctly inside the grid contents and does not affect the grid controls. So the issue is that if the grid is inside a data view, inside a table, or inside a tab container it does not display correctly
asked
2 answers
4

TLDR: The height of a DataGrid can be set with the style property in the modeler. The width of the data table can be increased by defining a width on the 'mendixDataGrid_tableWrapper' class in your theme.

Vertical scrollbars are automatically used when a DataGrid is the only widget in a form, and the content doesn't fit in the available space. It is also possible to force the height of a DataGrid by setting it with the style property in the Modeler, e.g. 'height: 150px'. If the rows don't fit, a vertical scrollbar will appear.

Normally a grid will always occupy 100% of the available width. However, if you want the columns to use more horizontal space, you can define a width on the 'mendixDataGrid_tableWrapper' class in your theme. Use a class to only define the width on a specific DataGrid. Example:

.wideGrid .mendixDataGrid_tableWrapper {
    width: 3000px;
}
answered
0

I've the same question and I'm VEERRYYY interested in the answer.

Ciao Toon

answered