Conditional set table row border color

I want to set the a table row border color based on the record data condition. That is if a flag in the table is set to "Y" change the border color to red. I tried setting the table row extended properties using the class If (condition, "border-color: red","").

Thanks




Hi,

if you add an "!important" does it work?

Hi Kevin,

"using the class"?

I think what you want is the style:

(you could also use the class but not with that syntax)

And don't forget to refresh the table using the Ajax-Refresh to rerender the table.

(I'm assuming you are using the Traditional Web)

Cheers,

José

Jose

My condition is 

If (CFNamesAddrTable.List.Current.CFNamesAddr.DECEASED_FLAG = "Y","border-color:red","")

It is on the ROW extended prosperities style = 

the DECEASE_FLAG is in the table. Not all record have it set to "Y".

The table is going through Ajax Refresh on a search . 

Kevin






When you inspect the page does the style appear where you expect it? Or is it completely missing?

Hi Kevin,

I've misread your question. I thought you wanted the whole table. Sorry...

So, let's start again... :)

The borders should be set in the cells and not in the rows. The best way (I think) in this case is to use classes.

Thus, set a conditional class in the rows that you want red:

Then, set something like this in the CSS of the Screen:

.TableRecords .highlightred td{
    border-bottom: 1px solid red;
    border-top: 1px solid red;
}

.TableRecords .highlightred td:first-child{
    border-left: 1px solid red;
}

.TableRecords .highlightred td:last-child{
    border-right: 1px solid red;
}

This will set the cells of the rows that have that class with the right border color.

Can you try this and let me know?

Cheers,

José

José Costa wrote:

Hi Kevin,

I've misread your question. I thought you wanted the whole table. Sorry...

So, let's start again... :)

The borders should be set in the cells and not in the rows. The best way (I think) in this case is to use classes.

Thus, set a conditional class in the rows that you want red:

Then, set something like this in the CSS of the Screen:

.TableRecords .highlightred td{
    border-bottom: 1px solid red;
    border-top: 1px solid red;
}

.TableRecords .highlightred td:first-child{
    border-left: 1px solid red;
}

.TableRecords .highlightred td:last-child{
    border-right: 1px solid red;
}

This will set the cells of the rows that have that class with the right border color.

Can you try this and let me know?

Cheers,

José

Jose 

I use style and it work fine. Thank you.

Kevin



Kevin Perkins wrote:

I use style and it work fine. Thank you.

Good to know.

Cheers,

José