11
Views
12
Comments
[OutSystems Data Grid] How can I freeze the two leftmost columns?
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

How can I freeze the two leftmost columns? 

The first column is a TextColumn (Type) and the second column is an ActionColumn (Naam). 

If I use the client action FreezeColumns during initialization and set ColumnsCount to 2, only the second column is frozen.


2026-06-29 12_55_45-Document1 - Word.jpg
2017-06-02 10-47-12
René van Britsem

Hi @Alka Asnani


I tried it, but unfortunately, this was not the solution. Only the 2nd column remains frozen.

2026-01-28 16-57-48
Mihai Melencu
Champion

Hi @René van Britsem ,

Can you check the first column's config, see if there might be anything that could be in conflict with the freeze.

2017-06-02 10-47-12
René van Britsem

Hi @Mihai Melencu ,

This is the config:

2026-01-28 16-57-48
Mihai Melencu
Champion

I did some testing, and it seems to be working as expected.

Do you have any other logic in the grid’s Initialize event that could conflict with the freezing behavior?

Also, from your screenshot, I noticed the column picker menu checkbox list. When you mention freezing, do you also mean that the first column should be disabled in that checkbox list, so users cannot hide it?

2017-06-02 10-47-12
René van Britsem


I also use the SetViewLayout, but that doesn't seem like a problem to me.And I do indeed mean that the 1st column must be disabled so that users cannot hide it.

2026-01-28 16-57-48
Mihai Melencu
Champion

In that case, you need to set the column config’s CanBeHidden value to False. The freeze action only freezes columns in the grid view. 


2017-06-02 10-47-12
René van Britsem

@Mihai Melencu That works! Thanks.


Now I only have a problem where the icons are incorrectly displayed on the empty lines.



The rest of the row is rightly not shown.

2026-01-28 16-57-48
Mihai Melencu
Champion

How do you render the icon? You should a validation for the cell content, something like If(Meldingen <> "", Icon, "")  .

2017-06-02 10-47-12
René van Britsem

I use the ConditionalFormatRules:




The CSS contains:



2026-01-28 16-57-48
Mihai Melencu
Champion

I tested it, and it's working, are you able to share the OML or create a sample OML with your full setup?

2017-06-02 10-47-12
René van Britsem

I'm going to give it a try.

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