[Data Grid Web] Row Autosizing
Forge component by OutSystems R&D

From my understanding, the FlexGrid library version was also bumped in the last update done to the datagrid component. This new version supports the row auto sizing feature, by setting autoSizeRows: true in the Grid AdvancedFormat property, the rows are still fixed height.


I think it is due to the GridFramework.js formatItems setting the row height based on the cell height parameter.


It would be nice to allow row auto sizing. Either by adding parameters to the GridContainer or by having the .js detecting if the autoSizeRows is set then don't force the row height.


Cheers.

Solution

Hi Neil,

This issue was solved, note that to allow this feature you have to configure your grid's height to 0. This way the code will now ignore this height and will calculate it.

You may need to do some other configurations too:

  • In the columns you want to have multi line and CR LF, configure the wordWrap: true and the multiLine: true (AdvancedFormats). This may affect your grid perfomance, as the content now has to be handled and calculated before loading the grid.
  • In your grid set property autoRowHeights: true (AdvancedFormats)

I prepared a sample for you showing how to do it, look to the column Part No.

Hope I could help you

Ricardo Valim

DataGridAutoRowHeight.oml

Hi Gabriel,


Thank you for the feedback, I've done some tests here to replicate your complain and the autoRowHeights is really blocked by the code inside formatItems.

I will open a support case to the team.


Best regards

Ricardo Valim

Any updates on this?

Solution

Hi Neil,

This issue was solved, note that to allow this feature you have to configure your grid's height to 0. This way the code will now ignore this height and will calculate it.

You may need to do some other configurations too:

  • In the columns you want to have multi line and CR LF, configure the wordWrap: true and the multiLine: true (AdvancedFormats). This may affect your grid perfomance, as the content now has to be handled and calculated before loading the grid.
  • In your grid set property autoRowHeights: true (AdvancedFormats)

I prepared a sample for you showing how to do it, look to the column Part No.

Hope I could help you

Ricardo Valim

DataGridAutoRowHeight.oml

Hi Ricardo,


Thanks for the solution. I tried to download the file but i think there is an error with your OML file. Can you please attach it again?

Thanks again.

Here it goes... =D

DataGridAutoRowHeight.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.