How can I change the Button label and Button background color when it's clicked.

How can I change the Button label and Button background color when it’s clicked.
This is the code snippet https://snippet.webix.com/0t55ov7v

Here when I click on Select Button it should change the label to Selected with the green background color and one more thing only for some buttons I need to display variants available indicator under the button label (Select Lable). Can somebody please help me with these issues?
Thank You in advance.

Hello, @raghukundapur4
To change the color and label for a cell, you can add a custom property to an element, and, depending on the presence of the property, apply one of two possible templates.
Here is the snippet: Code Snippet
Considering displaying “variants available indicator”. Could you please, provide us some more details, so we could try to help you?

Thank u so much.

Hello, @AlenaLisava Regarding “Variants available indicator” I want to display it at the bottom of the selected label but in that code snippet, it’s not displaying and also I want to display that indicator only for the first 2 rows. Could you please help me with this issue. Thank You in advance.

Hello, @raghukundapur4

Now, I see… This “Variants available” was “invisible”, since it did not fit the cell height. To solve the issue, you could use, for example, $heightto set row height.
Please, check the snippet here: Code Snippet
Here you could find more information for the topic.