[Data Grid] Freeze the first 3 column

Forge Component
(26)
Published on 31 Jul by OutSystems R&D
26 votes
Published on 31 Jul by OutSystems R&D

How can I freeze the first three columns without right-clicking and input the number of columns i want to freeze?

You can fix it by writing script in Expession under Grid Widjet.

<script>

var gObj =GridOS.ComponentUtils.getGridObjectById("+ Grid.Id +");
gObj.columns.frozenColumns = 3;
gObj.grid.frozenColumns = 3;
</script>


Try it.

I'm sorry.
As there was a mistake, I correct it.

"<script>

var gObj =GridOS.ComponentUtils.getGridObjectById(" + Grid.Id + ");
gObj.columns.frozenColumns = 3;
gObj.grid.frozenColumns = 3;
</script>"