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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Advanced Grid - sorting & searching . . .

dgg
11-Garnet
11-Garnet

Advanced Grid - sorting & searching . . .

ThingWorx 8.5.15

 

Hi there -

We have several use cases in which we need to perform a search via Windchill REST Services and present the paginated results in a Thingworx mashup.  Until now, I've focused on just getting the service and mashup combination to work.  Having done that, I wanted to add the ability for the end user to sort and search for data in the grid - similar to a DataTable.  I struggled with this for a while (documentation could be better) but finally got it working in a mashup and test service that returns a hard-coded list of seven rows of a simple Musician DataShape.  I now understand that sorting and searching of a grid must be done by way of a call to the source service used to populate the grid.  While that's not a big deal when using a tiny test service, it is noticeable.  And if it's "noticeable" with my test service, I have no doubt that it will be a performance killer when the service attempts to repeatedly search Windchill.


Given that CS271117 states that there is no way to sort the grid on the client-side:

  1. Is there some way to pass the existing grid data to the service in order to avoid re-running it over and over?
  2. Has anyone else found an effective means of dealing with this issue?
  3. Is the client-side functionality planned for a future release of Thingworx?

 

Thanks in advance for you help.

dgg

 

1 ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:dgg)

Hi @DGG.

 

To expand on the response from Jens, the new grid widget available in 9.3.0 is a replacement for the previous Advanced grid widget, and it provides the ability to sort without performing a call-back.  Here's a link to the new grid widget information in the Help Center.

 

The version of ThingWorx you are currently running is no longer supported, so there will be no updates to that release.

 

Regards.

 

--Sharon

View solution in original post

3 REPLIES 3
jensc
17-Peridot
(To:dgg)

Hello,

 

I have never tried it, but I don't see that there should be any issue to pass the data from your grid into a sorting service (or the same service with some logic to see if there has been data passed in) and do your sorting on that data instead of fetching it each time.

 

I think it was in Thingworx 9.1 (or perhaps 9.3) that we now have a client side (runtime) filter where you can filter on the data without having to call a service.

 

So unless you want to upgrade to a newer version (and do not want to build your own Grid widget), I think your first point sounds like a pretty good idea to try out.

 

Regards,

Jens

slangley
23-Emerald II
(To:dgg)

Hi @DGG.

 

To expand on the response from Jens, the new grid widget available in 9.3.0 is a replacement for the previous Advanced grid widget, and it provides the ability to sort without performing a call-back.  Here's a link to the new grid widget information in the Help Center.

 

The version of ThingWorx you are currently running is no longer supported, so there will be no updates to that release.

 

Regards.

 

--Sharon

dgg
11-Garnet
11-Garnet
(To:slangley)

@jensc;

@slangley

Thanks for your replies Sharon and Jens.  I don't think it makes a lot of sense to spend the time and effort to "roll my own" for this functionality when we'll likely be upgrading in the not-too-distant future.  Hopefully the installation / upgrade goes more smoothly than prior experiences, which involved a substantial amount of time and effort.

 

thanks again,

dgg

Top Tags