cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

How to reference an existing Style Definition from an Advanced Grid Configuration Service?

ssauvage-2
13-Aquamarine

How to reference an existing Style Definition from an Advanced Grid Configuration Service?

Hi!

 

I'm using a configuration script for an Advanced (Tree) Grid v4.0.2.

 

What I'd like to do is to reference an existing Style Definition from my configuration script, when setting styles' properties, rather than hard coding it. Indeed, doing so from various script ensures that you use same styles in all your grids.

In other words, technically, what I'd like to declare something like this:

    "styles":     {
        "tableHeaderStyle":              "MyProject.GridAdvancedHeaderStyle",

instead of something like this (hard-coded):

 

    "styles":     {                                    
       "tableHeaderStyle":              {
            "backgroundColor":          "#202020",
            "secondaryBackgroundColor": "",
            "foregroundColor":          "#ffffff",
            "textDecoration":           "",
            "image":                    "url",
            "lineColor":                "#c0c0c0",
            "borderStyle":              "solid",
            "borderWidth":              "1px",
            "fontFamily":               ["helvetica", "arial"],
            "fontStyle":                "normal",
            "fontSize":                 "11px",
            "fontWeight":               "bold"
        },

Of course I've tested it ... but it does not work. It seams that existing Style Definitions can be applied to Advanced Grids using GUI, but not Configuration Services ...

 

Thanks for support!

1 ACCEPTED SOLUTION

Accepted Solutions
ssauvage-2
13-Aquamarine
(To:dupatel)

Yes @dupatel, it's surely a limitation.

I hope it will be lifted, as reuse of style definitions is definitively a good practice to ensure homogeneous rendering in the application.

Thanks

View solution in original post

3 REPLIES 3
dupatel
19-Tanzanite
(To:ssauvage-2)

@ssauvage-2 For Style Definition, i believe this is the limitation at the moment and as pointed out we need to use UI to update definitions.

 

-Durgesh

ssauvage-2
13-Aquamarine
(To:dupatel)

Yes @dupatel, it's surely a limitation.

I hope it will be lifted, as reuse of style definitions is definitively a good practice to ensure homogeneous rendering in the application.

Thanks

PaiChung
22-Sapphire I
(To:ssauvage-2)

In the current version of Thingworx you should be able to use the CSS on the mashup to apply it.

You will have to know the DOM and Elements etc.

Top Tags