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.
Hi @Alka Asnani ,
I tried it, but unfortunately, this was not the solution. Only the 2nd column remains frozen.
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.
Hi @Mihai Melencu ,
This is the config:
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?
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.
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.
@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.
How do you render the icon? You should a validation for the cell content, something like If(Meldingen <> "", Icon, "") .
I use the ConditionalFormatRules:
The CSS contains:
I tested it, and it's working, are you able to share the OML or create a sample OML with your full setup?
I'm going to give it a try.
Youc an check the below post as well for reference:
https://www.outsystems.com/forums/discussion/81999/outsystems-data-grid-how-to-use-data-grid-to-freeze-columns-i-am-already-using/
Regards,
Manish Jawla