Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi,
I am using "gridAdvaced" widget in Thingworx (9.0) Mashup.
The grid configuration is written in one service.
In the service JSON is created with following code to clear the selection of grid :
"columns":{
.
.
.
},
"rows":
{
"selection":"multi",
"defaultSelectedRows":(NoOfRecords+1).toString(),
"autoScroll":false
},
"styles":{
.
.
.
}
I want the selected rows to get disselected whenever I change the page/ or data in the grid is changed.
The service is triggered on grid view button and page change event.
But if I select any row in the grid and then change the page or click the view button again (to trigger the configuration service), the selected row remain selected even if the data in the grid is changed.
Please suggest a workable solution ASAP.
Thank you in advance.
Solved! Go to Solution.
Hi @Rocky_2021 ,
You can create a service/function to set the "DefaultSelectedRows" property of grid-Advanced widget.
The service/function will return (number of records +1) or (some big value like 99999). (PFA)
To make this work in your case :
This work-around must work.
& PTC have resolved this issue in later versions so if you are using 9.1 or later, Reset property of grid-Advanced widget will also work.
Thanks
Hello,
My immediate thought is to use the "Reset" event on the advanced grid.
But I wonder if it would work for your specific use case?
Another option could be (I haven't tested this myself) to add a service that has an empty infotable of the same data shape as your grid and put it as the selected rows in the advanced grid each time you do something where you want to remove the selected rows.
Hope this gives you some inspiration to find a solution.
Regards,
Jens
But thanks for your suggestion, I will try to find some more ways to find solution/work-around for this.
Meanwhile anyone can please find the solution and share it.
Thanks
Hi @Rocky_2021 ,
You can create a service/function to set the "DefaultSelectedRows" property of grid-Advanced widget.
The service/function will return (number of records +1) or (some big value like 99999). (PFA)
To make this work in your case :
This work-around must work.
& PTC have resolved this issue in later versions so if you are using 9.1 or later, Reset property of grid-Advanced widget will also work.
Thanks
Thanks Buddy, This is working as expected.