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

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

Creating a Footer for the Grid widget using JSON configuration data

JO_9930585
14-Alexandrite

Creating a Footer for the Grid widget using JSON configuration data

I have a grid widget with dynamic columns. Because of this, I am using the JSON configuration to map instead of a standard datashape. With that said, I cannot get the footer to enable on the grid. The examples in the GridAdvancedExampleServices Thing use 

"enableFooter": true

 but this doesn't work. In the grid widget it is called "ShowFooter" so I tried changin "enableFooter" to this and "showFooter" with no luck.

 

How do I enable the footer via the JSON configuration?

ACCEPTED SOLUTION

Accepted Solutions
PEHOWE
17-Peridot
(To:JO_9930585)

Hello @JO_9930585 ,
I have taken a look at the issue of using Grid Widget with JSON defined table.
There appears to be a few items with getting the configuration correct. 
Here are the steps I believe you need to follow. Please review and let me know if you have questions.

  • Define a Mashup
  • Add a Grid Widget to the Mashup
  • Update the properties for the Grid Widget
    • Check the "ShowFooter", this will add
      • ShowHeaderRowInFooter
      • FooterData
    • Create a service which creates an InfoTable for the footer
    • Bind the InfoTable from the service output to the FooterData
  • Create a service to generate a JSON which describes the Grid you need.
    • The JSON need to have :  "enableFooter"
    •     "enableFooter": true,
      

Let me know if you have any questions

Regards,
Pehowe

View solution in original post

5 REPLIES 5
JO_9930585
14-Alexandrite
(To:Surya_Tiwari)

This is version 9.6. 

 

This doesn't work in my version. enableFooter = true does nothing. The example services work, but not the footer portion does not. I think this is probably a bug.

 

I did a workaround by putting totals in the top row of the returned data. I was trying to avoid this since this grid is editable. With that said, if they try to edit the totals, it will simply error out and do nothing. Not ideal, but it is fine.

PEHOWE
17-Peridot
(To:JO_9930585)

Hello @JO_9930585 ,
I have taken a look at the issue of using Grid Widget with JSON defined table.
There appears to be a few items with getting the configuration correct. 
Here are the steps I believe you need to follow. Please review and let me know if you have questions.

  • Define a Mashup
  • Add a Grid Widget to the Mashup
  • Update the properties for the Grid Widget
    • Check the "ShowFooter", this will add
      • ShowHeaderRowInFooter
      • FooterData
    • Create a service which creates an InfoTable for the footer
    • Bind the InfoTable from the service output to the FooterData
  • Create a service to generate a JSON which describes the Grid you need.
    • The JSON need to have :  "enableFooter"
    •     "enableFooter": true,
      

Let me know if you have any questions

Regards,
Pehowe

PEHOWE
17-Peridot
(To:PEHOWE)

Hello @JO_9930585 , I found the other flag which was added for the footer

"enableFooter": true,
"enableHeaderRowInFooter": true,

This will allow the grid footer and display the header row on the footer.

 

PEHOWE

CharlesJi
15-Moonstone
(To:JO_9930585)

Hi @JO_9930585 ,

It appears that there is a reply that answers your question.  For the benefit of other Community Members who may have the same question, it would be great if you could designate it as the Accepted Solution.

In the event that this response did not answer your question, please post your current status so that we can continue to support.

Thanks for using the PTC Community!

Regards,


Charles

Announcements


Top Tags