This is a migrated thread and some comments may be shown as answers.

Style DataForm editors with css

1 Answer 93 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marc
Top achievements
Rank 1
Marc asked on 11 Oct 2017, 08:46 AM

Hello,

will it be possible to style the DataForm editors using css classes in a future release?

In our app we use the nativescript-themes plugin to switch between different css files to provide multiple themes for the user. So we cannot write the calues for the fillColor, the labelTextColor etc directly into the xml.

 

Best regards

1 Answer, 1 is accepted

Sort by
0
Nick Iliev
Telerik team
answered on 11 Oct 2017, 09:13 AM
Hello Marc,

Exposing these custom properties to the global CSS in NativeScript is not considered at this point as these properties are not part of the official CSS specifications.
However, you can change the styling of your RadDataForm properties runtime. 
For example (based on this documentation section):
public changeGroupLabelTextColor() {
    var group = this.myRuntimeDataFormComp.dataForm.getGroupByName("Main Info");
    group.titleStyle.labelTextColor = "Blue";
}

That said you can implement a logic that changes the styles via code-behind execution.


Regards,
Nikolay Iliev
Progress Telerik
Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Tags
DataForm
Asked by
Marc
Top achievements
Rank 1
Answers by
Nick Iliev
Telerik team
Share this question
or