SelectedItemProperty binding throws exception on Android if it is set twice.

I have tried with a string /float list,and string/float selected value.If at startup the selectedItem Binding is triggered twice(for example one from the float default value,one when the backing property is set) the picker throws an exception when the value is trying to be set the 2nd time.it does the same if I have string list/value.

5 Replies

PA Paul Anderson S Syncfusion Team August 9, 2018 01:11 PM UTC

Hi Tamas, 
 
Greetings from Syncfusion. 
 
Query ; “SelectedItemProperty binding throws exception on Android if it is set twice” 
 
We have checked the reported issue and we are unable to reproduce the reported Exception issue. We have created a simple sample using the binding for SelectedItem property, please have the sample from the following link 
 
 
In this sample, the default value is “Red” and we can change value into “Blue” by using the binding property. 
 
Could you please provide the following details which provide appropriate solution for this issue. 
1)Please Provide the SfPicker Version which reproduced the reported issue. 
2)Modified the reported sample which replicate the reported issue. 
 
Please let us know, if you have any other concern. 
 
Regards, 
Paul Anderson 



TC Tamas Cons replied to Paul Anderson S August 10, 2018 10:24 AM UTC

Hi Tamas, 
 
Greetings from Syncfusion. 
 
Query ; “SelectedItemProperty binding throws exception on Android if it is set twice” 
 
We have checked the reported issue and we are unable to reproduce the reported Exception issue. We have created a simple sample using the binding for SelectedItem property, please have the sample from the following link 
 
 
In this sample, the default value is “Red” and we can change value into “Blue” by using the binding property. 
 
Could you please provide the following details which provide appropriate solution for this issue. 
1)Please Provide the SfPicker Version which reproduced the reported issue. 
2)Modified the reported sample which replicate the reported issue. 
 
Please let us know, if you have any other concern. 
 
Regards, 
Paul Anderson 


I ve uploaded the call stack,and the way I set up the picker.If I use selectedIndex binding and use a converter to retrieve the index of the selectedItem,it works.the picker is used as Dialog.Let me know if you could reproduce.Thank you

Attachment: SfPickerSelectedItemException_b598c56f.rar


PA Paul Anderson S Syncfusion Team August 13, 2018 04:22 AM UTC

Hi Tamas, 
 
With the provided code snippet image we have prepared a sample and in the sample we have also binded the selected index and we have used converter to retrieve the index of the selectedItem. With our sample we are unable to reproduce the reported issue from our side. Please find the sample from the below link. 
 
 
When analysing the stack trace image, the issue is reproduced when setting the footer view. So in your sample have you used any custom footer view? 
 
Regards, 
Paul Anderson 



TC Tamas Cons replied to Paul Anderson S August 13, 2018 07:15 AM UTC

Hi Tamas, 
 
With the provided code snippet image we have prepared a sample and in the sample we have also binded the selected index and we have used converter to retrieve the index of the selectedItem. With our sample we are unable to reproduce the reported issue from our side. Please find the sample from the below link. 
 
 
When analysing the stack trace image, the issue is reproduced when setting the footer view. So in your sample have you used any custom footer view? 
 
Regards, 
Paul Anderson 


no,there is no custom footer view.

"With the provided code snippet image we have prepared a sample and in the sample we have also binded the selected index and we have used converter to retrieve the index of the selectedItem" -> use selectedItem,not selectedIndex and converter.with selectedIndex and converter it works for me as well.with selectedItem is the problem of crashing


PA Paul Anderson S Syncfusion Team August 14, 2018 10:28 AM UTC

Hi Tamas, 
 
When binding the selected item using IValue converter, we were unable to reproduce the reported issue. On analysing the provided stack-trace we suspect it could be due to missing of resource map file. So, we have prepared a resource file with default resources and included it in the PCL project of the sample, which you can download from the following link: 
 
 
Please check this sample from your side and let us know the results to proceed further on this. 
 
Regards, 
Paul Anderson 


Loader.
Up arrow icon