Table Rows Color

Table Rows Color

  

Hi,

Im starting my jorney here on OutSystems. I have been doing exercises for a time and right now im trying to make some diferent things by my self.

Here is my problem, I want to change the color of the rows by comparing rows, if i get more then 2 results by that comparation, that rows get a diferent color.

Something like this, in this case the rows that have the words "Teste Igual" gonna have a different color of the rest of the rows.

I don't have any idea how to make this happens...


Hi  Henrique,

Please follow the below link to achieve this.

https://www.outsystems.com/forums/discussion/28097/styling-tables-with-rows-in-different-shades/


Regards,

Pankaj Pant

Hi,

Yeah I can change the color of the rows, but I want to make a selection of pairs of rows with the same value to be colored.

Like the imagine upthere, I just want the rows, "Teste Igual" to be colored.

Thanks,

Henrique Leite

Solution

Henrique Leite wrote:

Hi,

Yeah, I can change the color of the rows, but I want to make a selection of pairs of rows with the same value to be colored.

Like the imagine upthere, I just want the rows, "Teste Igual" to be colored.

Thanks,

Henrique Leite

For that, you need to use conditional CSS classes in the extended property.value will be like below.


If(GetGroups.List.Current.Integer.Count=1,"pk1",
If(GetGroups.List.Current.Integer.Count=2,"pk2",
If(GetGroups.List.Current.Integer.Count=3,"pk3",
If(GetGroups.List.Current.Integer.Count=4,"pk4",
If(GetGroups.List.Current.Integer.Count=5,"pk5",
If(GetGroups.List.Current.Integer.Count=6,"pk6",
If(GetGroups.List.Current.Integer.Count=7,"pk7",""
)))))))


It's just an example you can use your condition. but the classes will be added like that only.


Regards,

Pankaj Pant


Solution

Hi Henrique,

You can add style into extended properties of the cell, And put a proper condition according to which you want to change the color of a particular cell. It will work.

exp: 

If(TableRecords.List.Current.Employee.First_Name="Sacin","color:#FF0000","")

Sachin

Hi,


Thanks guys, I change a little bit the way of colloring the rows, I gave the atributes to a ComboBox, leting the user chose the color that he wants, and the row reads the value gived by the combobox.


Henrique

Henrique Leite wrote:

Hi,


Thanks guys, I change a little bit the way of colloring the rows, I gave the atributes to a ComboBox, leting the user chose the color that he wants, and the row reads the value gived by the combobox.


Henrique

Most Welcome Henrique!