Skip to main content
16-Pearl
July 9, 2025
Solved

How to keep GridAdvanced tree entries expanded after data reload?

  • July 9, 2025
  • 1 reply
  • 813 views

Hi everyone,

I’m working with GridAdvanced in ThingWorx and I’m using it in tree mode to display a parent-child structure:

  • I have main entries (parents) and when you click on one, it expands to show the sub-entries (children) below.

My challenge is:
Whenever I make a change and reload or refresh the data in the grid (e.g., after an action or a service call), all the parent entries collapse and I lose the expanded state. I’d like the grid to keep the same entries expanded after the data is loaded again, so the user doesn’t have to click and open them each time.

Does anyone have best practices or tips for how to keep certain tree rows expanded after reloading the data?
Is there a recommended way to save and restore the expanded state programmatically?

Any suggestions, examples, or workarounds would be greatly appreciated! 🙏

Thanks a lot in advance!

Best answer by TonyZhang

Hi @MA8731174,

 

In the Tree Grid Advanced widget, there is a property named PreserveRowExpansion that you can enable to fulfill your use case I believe.

See Help Center:

 

Best,

1 reply

TonyZhang16-PearlAnswer
16-Pearl
July 14, 2025

Hi @MA8731174,

 

In the Tree Grid Advanced widget, there is a property named PreserveRowExpansion that you can enable to fulfill your use case I believe.

See Help Center:

 

Best,

MA873117416-PearlAuthor
16-Pearl
July 14, 2025

Thanks for your answer! 

Actually we are using grid widget and NOT tree Grid. In Grid widget i have child entries and parent entries. I have checked this preserverRowExpansion checkbox true but still it does not work. As from documentation its stated that its just for Tree Grid.

Any further tips would be great!

 

MA8731174_0-1752482729884.png

 

16-Pearl
July 15, 2025

Hi @MA8731174,

 

Hi, I tested PreserveRowExpansion for ptcs-grid (Standard Grid) widget and it is working in ThingWorx 9.6.0  (Tree Grid only means you are displaying tree-structure data in Grid widget I guess).

Which version of ThingWorx are you running? 

I found internally that there's a bug being fixed regarding PreserveRowExpansion in ThingWorx 9.6.0.

Also, please make sure that CacheRuntimeChanges is set to true along with the PreserveRowExpansion

 

Best,