Skip to main content
1-Visitor
May 16, 2018
Solved

How to assign List widget selection to a thing property?

  • May 16, 2018
  • 7 replies
  • 3107 views

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.

Best answer by amittal-3

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

22-Sapphire I
May 16, 2018

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.

5-Regular Member
May 17, 2018

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

Kiran11-VisitorAuthor
1-Visitor
May 17, 2018

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.

5-Regular Member
May 17, 2018

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