Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Hi, I have a problem with configuration of Advanced Grid columns via JSON.
My goal is to create one editable column, no problem with that.
And I also need to capture the values of the selected row.
The problem is that when the Editable property is set to true, then row selection does not work.
When the Editable property is set to false, then the row selection works very well.
My TWX Version: ThingWorx 8.4.0-b2013
Configuration for single selection row:
"rows": { "selection": "single", "defaultSelectedRows": "", "minHeight": "20px", "autoScroll": false }
Configuration for edition:
1. Activation of table edition mode
"cellEditingEnabled": true,
2. Definition of cell to be editable
{ "targets": 0, "fieldName": "priority", "title": " ", "width": "23px", "autoWidth": false, "overflow": "wrapped", "headerTextAlignment": "center", "textAlignment": "center", "hidden": false, "inLayout": true, "columnFormatter": { "type": "integer", "format": "0", "cellEditor": { "enabled": true } } }
I have found another post that refers to the same problem but with the Tree Grid Advanced 4.2.0, but no solution founded:
https://community.ptc.com/t5/ThingWorx-Developers/Tree-Grid-Advanced-4-2-0-Row-Selection-does-not-work-when/m-p/610508/highlight/false#M36432
Thank you for any help in advanced.
Regards,
Ana Duarte.
Solved! Go to Solution.
Minor modification to the implementation I have stated earlier. Instead of choosing the input of base type DataShapeName to the service, set the input parameter of base type to Infotable. Bind the SelectedRows property of the advanced grid widget to the service and trigger the service upon the double click event.
Please find the attached image for reference. InputFromSelectedRow is the service which accepts an Infotable as it's input.
Hi Ana,
I did notice the issue you have mentioned with row selection not working as intended when Editable property is set to True. I would like to thank you for bringing this to our attention. I will inform this to our R&D team.
I would like to add that you can capture the values of the selected row by binding the SelectedRows property of the Advanced Grid widget to a service. Please follow the below steps to achieve this.
Please find the attached images for your reference.
Best regards,
Rajesh.
Minor modification to the implementation I have stated earlier. Instead of choosing the input of base type DataShapeName to the service, set the input parameter of base type to Infotable. Bind the SelectedRows property of the advanced grid widget to the service and trigger the service upon the double click event.
Please find the attached image for reference. InputFromSelectedRow is the service which accepts an Infotable as it's input.
Thank you so much :).
Before making my post yesterday, i had tried to use the selected rows of the grid, as you say, but i must have done something wrong because it didn't work.
But i thank you for the detail of your exemple, i think that is going to help me!
(i'll acept your solution, if i have any other problem i'll open another post)
Best regards,
Ana Duarte.