Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

On or off the listview switch based on a condition?

$
0
0

I have a listview with a switch, like below screenshot.

string userIds = Application.Current.Properties["GroupUserIds"].ToString(); (userIds is a comma separated string)
I need to on the switch item if the id of switch item exists in the above string(userIds).

For example, if the id of Vimal Mathew is 120 and the value of userIds = 181,481,476,120,132(120 exists in userIds). Then the switch for Vimal Mathew should be in on state and other list items switches should in off state those are not in userids string.

How can I do this?
Thanks in advance :)


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>