Skip to main content
12-Amethyst
July 20, 2022
Solved

Grid SelectedRows cant be set

  • July 20, 2022
  • 1 reply
  • 4284 views

I recently updated thingworx to 9.3.3.

When i set the SelectedRows source i get the following error while debugging:

13:45:54 ERROR - Runtime exception handling data update for binding {"Id":"097e2722-4c44-48f8-babd-0eaa37bbd51e","SourceId":"GetSelected","SourceArea":"Data","SourceSection":"Things_Jens Test Thing","SourceDetails":"AllData","TargetArea":"UI","TargetSection":"","TargetId":"ptcsgrid-8","PropertyMaps":[{"SourceProperty":"","SourcePropertyType":"InfoTable","SourcePropertyBaseType":"INFOTABLE","TargetProperty":"SelectedRows","TargetPropertyType":"property","TargetPropertyBaseType":"INFOTABLE"}],"isBoundToSelectedRows":false,"nEntries":1}

Exception: this.updateSelectedRowsProperty is not a function on line number 1 in file mashup-common-widgets-runtime.js?_v=9.3.3

 

i put a demonstration file in the attachments. if you change the getSelected binding to the Gridadvanced widget it works as expected. but it doesnt work on the new Grid widget.

I am missing something, or is this a bug?

Best answer by slangley

Hi @JU_10321794.

 

ThingWorx 9.3.4 is now available, and this release contains a fix for your issue.  Please check it out.

 

Regards.

 

--Sharon

 

1 reply

Support
July 21, 2022

Hi @JU_10321794.

 

We took a look at your mashup, but we're not understanding what you're trying to do.  From our initial review, it appears this can be simplified but we need to understand more.  Row selection can be controlled without the GetSelected service.

 

What is your use case?  

 

Regards.

 

--Sharon

 

 

12-Amethyst
July 22, 2022

Dear Sharon,

 

I can give you some background. I have a list of machinegroups that is present on multiple mashups.

when i select a machine group i want it to remember what machinegroup was selected, so when i load a different mashup i can set the selected machinegroup to the previous selected machinegroup.

 

the above case is just an easy way to test.

Because i am upgrading from thingworx 9.0.3 to 9.3.3, and all existing pages use the advanced grid widget(now deprecated). when upgrading to the Grid widget, the selection proces doesn't work.

 

i will add some pictures to illustrate.

case 1 is the old advanced grid widget

Case 1.PNG

case 1 result.PNG

case 2 is the new grid widget

case2.PNG

case2 with error.PNG

Regards,

Jens

12-Amethyst
August 12, 2022

He @slangley,

 

depends on the mashup, but i already excluded part of the problem in the testfile that i send.

The problem isn't that i don't get the right one selected. The problem is that i cant select any at all.

as shown in the testfile:

This is the Infotable with bound to all:

 

var result = DataShapes['testJens'].CreateValues();
result.AddRow({
ColNameOne : true,
ColNameTwo : 1,
ColId:1
});
result.AddRow({
ColNameOne : false,
ColNameTwo : 2,
ColId:2
});

this is bound to SelectedRows:

 

var result = DataShapes['testJens'].CreateValues();
result.AddRow({
ColNameOne : false,
ColNameTwo : 2,
ColId:2
});
//i only set the id field usually. but wanted to test if it had to match for 100%.

this works with the (legacy)advanced grid widget.

It selects the second row.

 

But the Grid widget just doesn't select anything.it just gives me this error:

09:35:56 ERROR - Runtime exception handling data update for binding {"Id":"097e2722-4c44-48f8-babd-0eaa37bbd51e","PropertyMaps":[{"SourceProperty":"","SourcePropertyBaseType":"INFOTABLE","SourcePropertyType":"InfoTable","TargetProperty":"SelectedRows","TargetPropertyBaseType":"INFOTABLE","TargetPropertyType":"property"}],"SourceArea":"Data","SourceDetails":"AllData","SourceId":"GetSelected","SourceSection":"Things_Jens Test Thing","TargetArea":"UI","TargetId":"ptcsgrid-8","TargetSection":"","isBoundToSelectedRows":false,"nEntries":1}

Exception: this.updateSelectedRowsProperty is not a function on line number 1 in file mashup-common-widgets-runtime.js?_v=9.3.3

 

I also made a support case for this. This must be a bug.

SelectedRows just doesn't select anything.