Table View - Enable/Disable per row

So I have a table that I’m displaying in a form Table View (Locked), where the button does some action

|ID|Status|Button|
|1|Good|Button|
|2|Great|Button|
|3|Bad|Button|

Basically, what I want is to disable the button on each row if the status === ‘Bad’
But setting the enabled property of the button sets it for all the buttons on the list.

Is there an easy solution I’m missing?

Thanks!

HI,

Not sure which Servoy you are using and what client you are deploying.
In NGClient, if you are using a table-component or any other component where the columns have a StyleClassDataProvider, you can do the following:

  1. Create an unstored calculation in your table which returns a style-name when status == ‘Bad’. A calculation like

if(status == ‘Bad’) return ‘bad-status’;

  1. In your CSS, add something like

.svy-button .bad-status { display: none; }

  1. select your calculated field as StyleClassDataProvider.

Hope this helps,

Christian,

Thanks, that helped!