Style DataForm editors with css

Thread is closed for posting
2 posts, 0 answers
  1. Marc
    Marc avatar
    101 posts
    Member since:
    Oct 2013

    Posted 11 Oct 2017 Link to this post


    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

  2. Nikolay Iliev
    Nikolay Iliev avatar
    351 posts

    Posted 11 Oct 2017 Link to this post

    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.

    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.
Back to Top