Skip to main content
May 16, 2018 12:10 PM UTC
Solved

How to assign List widget selection to a thing property?

I have a requirement where selection of list widget have to set as a thing property.

How can i accomplish this?

i checked but couldn't find the option to access the selection of list widget.

amittal-3Answer
May 17, 2018 10:31 AM UTC

Hello Kiran,

The service with which you are binding the input data/source of your list widget, it has the event of "selectedRowsChanged". You can bind this event to make the call to your SetProperties service. I hope this should work.

Let me know if this is what you need and if it works!!

Thanks

Aditya Mittal

7 replies

May 16, 2018 1:04 PM UTC

There are a few different threads about this, Selection of a data item is tracked in the Data source.

Data is showing as data/selected rows

you can grab the selection from the selected rows.

May 17, 2018 6:46 AM UTC

Hi Kiran,

 

The List widget itself doesn't send out information or property values, it is just a display tool. The value you can retrieve from the List widget is the Selected Rows field in service sending data to the widget. 

 

And after you made selection in List in the mashup, the selected rows field will update the data to a subscription or service you bound to the property that needs to get updated

Kiran1Author
May 17, 2018 7:17 AM UTC

Thanks for responding.

I have assigned the selected row to setproperties method of a thing but i am exploring ways to trigger the setproperties service as soon as selection made in dropdown of list widget.

Do reply if found a solution.

May 17, 2018 7:38 AM UTC

Hi Kiran,

 

As you know, if you want to trigger a service or subscription, you need a event.

 

In List widget itself, it only has a DoubleClicked event, that's not very user friendly to operate the update, while you can use the event from service side, SelectedRowsChanged event. If you selected a new value in the list, this event can trigger you update service