How to change the content of one picker based on the new selected value in another picker.

Hi SF Support person,
I have a Xamarin Forms app but in one section I require some specialized code for Android for managing Camera2. (similar code will be required for iOS later)
There are a few pickers that we use for recording details about the picture taken. Two of them are related. We have a picker for the Floor of the building (i.e. Basement, Ground, Upstairs - or whatever they decide to use). And then there is a picker for Room. The Room Picker gets populated depending on what Floor is picked.
I can do the initial populating fine. If control is passed in with Floor = Basement selected, then it also fills the Room picker with Rooms from the Basement.
But if I am already in the Android portion of the app and make a change to the selected Floor, say to Upstairs, then the corresponding rooms do not appear in the Room picker.
For both Floor and Room pickers I have set upArrayAdapter,DataAdapter and Spinner.Adapter.
Thoughts on what I may be missing? Would you have a sample that I could follow?
Thanks!

3 Replies 1 reply marked as answer

JK Jeya Kasipandi Syncfusion Team November 13, 2020 01:54 PM UTC

Hi Will Autio,

Greetings from Syncfusion.

We have analyzed your query and created sample based on your requirement. Please find the sample from below location.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/PickerSample2020769468
 
In this sample, we have added two picker and changed the picker itemsource based on the selected value from another picker by using OnSelection changed event.

Please check with the above sample and let us know if you have any concern.

Regards,
Jeya K


Marked as answer

WA Will Autio November 13, 2020 06:37 PM UTC

Hello Jeya K,

Thanks for your reply and the sample code. That worked well.

Regards,
Will


SP Sakthivel Palaniyappan Syncfusion Team November 16, 2020 03:07 AM UTC

Hi Will Autio,

Thanks for the update.

We are glad to know that issue has been resolved at your end. Pease let us know if you need further assistance on this.

Regards,
Sakthivel P.
 


Loader.
Up arrow icon