I want to show the two different icons in one column based on the value in the current row in outsystems datagrid. If anyone know the solution please help me.
Hello @Suriyakala S,
You have to add a class in the variable and call the column in grid
Fallow the below steps to show icon based on condition
1) create a structure with required columns as mentioned
2) Bound the aggregate output to your variable list (structure)
Note: while binding based on condition change the icon names as per need
3) Then call the ArrangeData with the same variable (structure) list
4) Get the JSON output with required column and bound to Grid source
5) Add the columns to Grid manually and bind the headers
Output
Attached is the OML for your reference
Regards,
Vinod
@Vinod Kumar R , I think this will work for me. Thanks for the reply.
Hi @Vinod Kumar R , I have another requirement in datagrid. That is i need to show the color for text in all columns for the particular row based on condition. do u have any solution for this?
Hello @Suriyakala S
You just need to add an if whit your condition, like this
Then when the condition is true you put the icon you want if is false you put the other icon, and on the if condition you put your condition, based on the current context
@Bruno Rendeiro , Im not using table records, im using Datagrid. But thanks for your reply.
Hi @Suriyakala S
As i understood either you are using ArrangeData server action or JSONSerialise tool as the Data property,
So if you are fetching data from aggregate and later you convert this data to JSON, then before converting it to JSON you can add one more which you want to display in your Grid,
preferred way to add a computed column in Aggregate itself and from there you can use it in your grid.
I hope it'll help you,
Thnaks
Deep
@Deepsagar Dubey , Im using arrangedata server action. Okay. I will try what u said. Thanks for the reply.