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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Grid Configuration - Row Based State Definition

travman7777
12-Amethyst

Grid Configuration - Row Based State Definition

Anyone have success setting up row based state definitions using a grid configuration? 

 

Below is a code snippet of my configuration. I have checked that the column "fieldName" matches the field name below, values in my table the states "value", and that I am able to apply general styling to the grid. (see the commented out style).  Any ideas on what else could be going on?

 

 

        "rows":       {
        "selection":                  "single",
        "defaultSelectedRows":        "",
        "minHeight":                  "30",
        "autoScroll":                 true, 
        "rowFormatter": { 
            "stateDefinition": {                       
                "name":      "Entry Difference Indicator",
                "fieldName": "entryDifferenceIndicator",
                "type":      "not-fixed",
                "states":    [  
                    {
                        "name":       "Different Entries",  
                        "value":      "noEquivalentEntry",
                        "comparator": "==", 
                        "styleName":  "rowFormatterStyle" 
                    }
                ]
            }
        }
    },
    "styles": {
        "rowFormatterStyle":             {
            "backgroundColor": "blue",
            "fontWeight":          "bold"
        },
        /*"rowBackgroundStyle":             {
            "backgroundColor": "blue",
        },*/
    }

 

ACCEPTED SOLUTION

Accepted Solutions

Hi Sharon,

 

I ended up copying and pasting code from the service "GetEmployeeConfiguration" on the GridAdvancedExampleServices thing found from the link below, and inserting code specific to my project.  Most likely some typo in my code that I could not find.

 

https://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/index.html#page/ThingWorx/Help/Mashup_Builder/Widgets/AdvancedGridsSamplesFile.html#wwID0ECAX5

View solution in original post

2 REPLIES 2
slangley
23-Emerald II
(To:travman7777)

Hi @travman7777 

 

Can you provide more details on the issue?  What are you trying to do that isn't working as expected?  If you can send some screenshots showing what you want vs. what you are seeing would be helpful.

 

Regards.

 

--Sharon

Hi Sharon,

 

I ended up copying and pasting code from the service "GetEmployeeConfiguration" on the GridAdvancedExampleServices thing found from the link below, and inserting code specific to my project.  Most likely some typo in my code that I could not find.

 

https://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/index.html#page/ThingWorx/Help/Mashup_Builder/Widgets/AdvancedGridsSamplesFile.html#wwID0ECAX5

Announcements


Top Tags