I am currently trying to give an input widget a dynamic class in a Table. For each row the input widget should change its class depending on its input. Now this does not seem to work. The classes works perfectly, but unfortunately it applies to all of the rows. 

How can I manage to only apply the style of the input widget of the current row? Just like the validation  is working on an input.

Many thanks!


Hi Martijn,

If you have it from the table the class you are applying should be the one of the current Row, something like TableRecordsWidget.List.Current.Entity.StyleAttribute.

In this way the style for each row will be dynamic for each row.




I can help you better if you specify how will the classes apply depending on the rows. 

Anyway, you can do it by using the "CurrentRowNumber" property of the table:

This will assign "class1" to the input if it is the first row and "class2" otherwise. 

Binding a class to the current row as João is suggesting is an even better approach by the way. If you don't know how to do it, feel free to ask.

Thank you guys! 

The solution of João was a best fit of my situation. The solution was way more simple than I was thinking.

Many thanks again!