How to add Tag component in the Outsystems data grid column? I need to add tag in the classification column and the colour of tag is changing based on status.
I need a guide for this.... because I'm first time using data grid... Thank you..
@JWLoo
Yes, you can archive that with javascript below:
The result:
Hi @JWLoo,
If you feel my solution helped, please mark it The Solution for the question. It will help other users who have same problem find the answer faster.
Hi @Kiet Phan, can you provide the oml on how to apply the javascript? Because it's not working in my screen. Thanks.
Hi @JWLoo, you can use "Tag" block available in "OutSystemsUI", it accepts pre defined colors from "color" static entity, in case you want custom colors, you can write your own CSS and use that using the "ExtendedClass" input.
ThanksGitansh Anand
can this tag component use inside the data grid? if yes, please guide me on that. Thanks
Hi @JWLoo, yes it can be used in data grid, just put this block where you have placed your expression value of "Classification" column and move that expression value inside the "Tag" block. This block has color input which accepts Color Identifier, you can use "If" condition to set different colors based on different values of "Classification" column, there is also an input "IsLight", if you set it as true it will use lighter shades of the colors, and a I mentioned previously if you don't like the predefined colors you can write your own CSS and apply it with "ExtendedClass" input. Please refer to the attached OML.
Hi Gitansh Anand, thank you but the oml file that you sent is using table component, it's not using data grid component....and I can't put a block or tag components inside the data grid....