using ptcsgrid for displaying a tree grid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
using ptcsgrid for displaying a tree grid
hello all,
I'm using thingworx 9.5 and I'm trying to configure it for displaying a tree, It's not clear for me the needed infotable and how I need to configure the ptcsgrid widget for this.
any hint, example, tutorial, documentation is apreciated
- Labels:
-
Design
-
Examples
-
Mashup-Widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, @AK_10638440 Can you take a look at the below article and let us know if it will work in your case or not?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Surya,
the tree grid advanced you proposed is a legacy widget in Thingworx 9.5. I'm trying to use the new grid widget which can be used for a tree view also, but I'm not sure how
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AK_10638440 Thingworx has a tree widget also, can you take a look if it can fulfill your use case, I will try your above scenario and let you know my findings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I know about tree widget, but the grid are more customizable, so I would prefer that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If i remember correctly, you have to provide the column names for parentId maybe also HasChildrenFieldName.
ChildData can be the same infotable as Data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
An example of the data to be used and related fields would be very appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Service getTree:
result = Resources["InfoTableFunctions"].CreateInfoTable();
result.AddField({name:"id", baseType:"INTEGER"});
result.AddField({name:"parentId", baseType:"INTEGER"});
result.AddField({name:"name", baseType:"STRING"});
result.AddField({name:"hasChildren", baseType:"BOOLEAN"});
result.AddRow({id:1, name:"Europe", hasChildren:true});
result.AddRow({id:2, parentId:1, name:"CER", hasChildren:true});
result.AddRow({id:4, parentId:2, name:"Germany"});
result.AddRow({id:5, parentId:2, name:"Switzerland"});
result.AddRow({id:3, parentId:1, name:"NER", hasChildren:true});
result.AddRow({id:6, parentId:3, name:"Sweden"});
Binding:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Please check below link for steps to display tree with Grid widget in ThingWorx 9.6
Also, Rocko shared an example how to create data source for Grid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@wcui That is not correct, it is documented here for ptcs-grid: https://support.ptc.com/help/thingworx/platform/r9.5/en/#page/ThingWorx/Help/Mashup_Builder/Widgets/Grid_AddingAGridWidgetToaMashupdita.html# and I gave an example above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@iguerra
It appears that Rocko answered 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,
wcui