NG client CSS: fied VS. svy-field, .svy-textfield

Hello,

In Servoy 8.0.2 NG client,
how to properly assign style to a field placed on form (mode Table view)?

Further, goal is to alternate row color (like onRender event was used in previous versions)? Was able to achieve it for label by simply removing prefix from .css as described in section Changes from previous version and building

.ui-grid-row-selected div.ui-grid-cell

https://wiki.servoy.com/display/public/DOCS/Styling+in+the+NGClient
Have also tried to find proper technique in sample solution servoy_sample_ng_basic.servoy

How to elegantly build fancy, context-sensitive field in NG client?

Regards

you can target a field that is inside a tableview by using something like this:

.ui-grid-cell .svy-field {
background-color: red
}

what do you mean with context-sensitive?
So styling based on data? For this we need special labels

8.0.3 has a onrenderlabel (as a first example): https://github.com/Servoy/servoy-client … label.spec

for that we have a styleclassexpression wich can be a calculation what returns a class name based on any data that you want to use.

Thanks a LOT Johan,

This is the needed snippet

.ui-grid-row-selected div.ui-grid-cell .svy-field 

By context I meant Table VS Record view of the form and was able to use your guideline for both.

Great theoretical hints on onrenderlabel + styleclassexpression also, thanks again!

Regards