[Data Grid Reactive] Frozen columns not part of GetViewLayout?
Forge component by OutSystems R&D
Application Type
Reactive

Hi,

It looks like the GetViewLayout action does not return information regarding which columns are frozen in the current view. Is there any way to incorporate this? We have created additional functionality that lets the user save several personal layouts. But now the frozen columns are lost when you apply a saved layout to the grid.

Regards,
Alfio Esposito

Hello Alfio,

Thanks for bringing this subject to the discussion.

 
As of now, we don't have this implemented.

As a workaround, we can use the GridAPI to retrieve the frozen columns with:
GridAPI.GridManager.GetGridById($parameters.GridWidgetId).provider.frozenColumns;

And later set this attribute with the retrieved property:

GridAPI.GridManager.GetGridById($parameters.GridWidgetId).provider.frozenColumns = $parameters.FrozenColumns;

 

In the attachment, you can find a sample OML with this implementation.

 

Please bear in mind that we didn't make all the necessary tests to ensure that it will work on all cases.

Please let us know if this helps.

 

Best regards,

Gabriel Lundgren


GridLayout.oml

Hi Gabriel,

Thanks a lot for your suggestion and the example. While I was testing it I noticed some strange behavior that I really cannot explain. So hopefully your are able to shed some light on this.

Open the example and freeze the first 3 columns. Then click on the button to get the grid layout. Next, unfreeze the columns and then move the last column to the front of the grid. You now have to press the button to set the layout twice before the frozen columns re-appear.

Regards,
Alfio

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