ItemManager throws exception on ios device

Dear all, 

I am trying to access a DataFormItem and change it's IsReadOnly property when user changes another picker item in a certain way. I am using 
var dataFormItem = dataForm.ItemManager.DataFormItems["Name"];
in the PropertyChanged event to get the item I want to change. It works as expected on UWP and Android, but throws an ArgumentNullException on IOS with the message "Value cannot be null. Parameter name: source". The dataform.ItemManager.DataFormItems.Count shows the same exception, despite seeing the full form on the device with 27 items. 

Any idea what could be wrong here?

Thanks and kind regards,
Gerhard


Here is the stack trace:
  at System.Linq.Enumerable.Where[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0000d] in <872243e21728479098755c520ce89da6>:0
  at Syncfusion.iOS.DataForm.DataFormItems.get_Item (System.String propertyName) [0x00015] in <702951e3caf247c4bdca5fb611e83ed1>:0
  at Syncfusion.XForms.iOS.DataForm.DataFormDependencyService.GetDataFormItem (System.Object nativeObject, System.String propertyName) [0x00000] in <702951e3caf247c4bdca5fb611e83ed1>:0
  at Syncfusion.XForms.DataForm.DataFormItems.get_Item (System.String propertyName) [0x00006] in <41d5e6e9c2cf4905b175b7ebb1e37ef0>:0
  at GenericUserLogin.EditUserPage.EditUserPage_PropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00058] in D:\Programme\Visual Studio 2017\Projects\GenericUserLogin\GenericUserLogin\GenericUserLogin\Views\92_EditUserPage.xaml.cs:137 23:31 07.08.2018



1 Reply

SG Swathi Gopal Syncfusion Team August 10, 2018 03:54 AM UTC

Hi Gerhard, 
 
Based on the provided information, we have checked with the SfDataForm and we are not able to reproduce the issue (ArgumentNullException on iOS with the message "Value cannot be null. Parameter name: source".) in Xamarin Forms iOS platform from our side. Could you please share us the below detail? 
 
# DataForm version 
# Device OS version 
 
We have created a sample for the mentioned query. Registered a picker item and in the property changed event we have changed the ReadOnly property of a text field(FirstName) by getting that data item as mentioned by you. Kindly find the sample below, 
 
Sample:  SfDataFormSample
 
 
 
Could you please check with the provided sample whether the mentioned issue is reproduced? If not, kindly modify the sample attached and revert us back with more details regarding your query. Such that it will be helpful for us to provide you solution. 
  
Regards, 
Swathi G 


Loader.
Up arrow icon