On this Data Grid collection, I’d like to know if thanks to javascript, it would be possible to grey out some cells based on another cell (for instance in this image, hide cell budget column when “mode d’achat” is volume.
Thanks for your answer - The fact is that the budget is an input from the user, I can’t use a if then column, I’d like to “fake a disable” using colored cells in the front. Does that make sense?
I don’t think you can have granular control like that on a row by row basis.
Would it be reasonable to have separate collections each filtered to there respective mode and disable editing in the Volume collection?
Other than that, my best guess would be to do something with CSS, but I usually don’t travel down that path, so I don’t have any immediate suggestions.
I think front-end JavaScript is the easiest way to deal with this, but unfortunately I don’t think Glide allows you to use JavaScript for the front-end.
What I meant is to keep the input text column but you can use the “Display as” option to fetch the value from an if-then-else column (ITE). In the ITE column, you can create a rule such that when the value of the “mode d’achat” column is “volume,” it displays “Don’t edit,” else it displays “Budget.”
So, as long as the “mode d’achat” column has the text “volume,” the message you created in the ITE column will be automatically displayed in the input text column. This approach ensures that users see the appropriate message without needing to manually populate it each time.
Yes but the budget column is a input from user so I can’t create a ITE column for this… I really need to just prevent the user from entering information in this column