Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi,
I created a custom table widget , the widget can bind data and display well . When the table row get selected , I can get the selected row(s), but how can I set the rows to the binding service's "Selected Row(s)" ?
I can defined a JSON property as selected value, but I prefer the standard mashup binding style for selected rows.
Regards,
Sean
Solved! Go to Solution.
I think something like:
// -- yourWidget it's the javascript instance of your widget
// -- Where 'Data' it's the name of the infotable property on your widget
// -- [array..] --> if you have single select, something like [3] or multi select [0,3,8]
yourWidget.updateSelection('Data',[array of indexes to be selected]);
I think something like:
// -- yourWidget it's the javascript instance of your widget
// -- Where 'Data' it's the name of the infotable property on your widget
// -- [array..] --> if you have single select, something like [3] or multi select [0,3,8]
yourWidget.updateSelection('Data',[array of indexes to be selected]);
Thank you for your hint. While I found updateSelection indeed used to update the Selected Rows, the widget.runtime.js must also has function "handleSelectionUpdate" defined , otherwise the runtime framework will assume that the widget doesn't care about selection update.
one more question, where do you get the following API comment ? I couldn't find it in the ThingWorx Extension Development Guide .
// -- yourWidget it's the javascript instance of your widget
// -- Where 'Data' it's the name of the infotable property on your widget
// -- [array..] --> if you have single select, something like [3] or multi select [0,3,8]
Regards,
Sean
It's my own one
got it . thank you for the sharing : )