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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Advanced Grid Widget 4.1.1 - Row Selection does not work when isEditable property is Checked

aduarte
12-Amethyst

Advanced Grid Widget 4.1.1 - Row Selection does not work when isEditable property is Checked

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.

ACCEPTED SOLUTION

Accepted Solutions
Rajesh_Sayana
13-Aquamarine
(To:aduarte)

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. 

View solution in original post

3 REPLIES 3
Rajesh_Sayana
13-Aquamarine
(To:aduarte)

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.

  • Create a DataShape that has all the properties of a selected row from your Advanced Grid.
  • Create a service with input base type as DataShapeName and set the default DataShape to data shape you have created in the above step. 
  • Bind the SelectedRows property of the advanced grid widget to this service.
  • Please ensure that the RowSelection option is set to Single/Multiple (as per your requirement) from the advanced grid widget properties.
  • You can now access the properties of the selected row from the advanced grid inside this service. 

Please find the attached images for your reference.

 

Best regards,

Rajesh.

Rajesh_Sayana
13-Aquamarine
(To:aduarte)

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.

Announcements


Top Tags