System.ArgumentNullException: Value cannot be null. Parameter name: element

All calls to DataForm_AutoGeneratingDataFormItem, (6 items, all non-null), are completing successfully. At their completion, I am getting a "System.ArgumentNullException: Value cannot be null. Parameter name: element" error before the page displays. I've attempted to step into the deep source but I lack the appropriate pdb's.  I've attached a call stack and the code for the auto-gen event, (I'm not getting an error in the event). Any ideas?  If not, I'll back out the control and code this manually. Thanks. 

private void DataForm_AutoGeneratingDataFormItem(object sender, Syncfusion.XForms.DataForm.AutoGeneratingDataFormItemEventArgs e)
        {
            try
            {
                if (e.DataFormItem != null)
                {
                    // Added 7/29/18 in an attempt to circumvent a pesky null value issue
                    var itemName = e.DataFormItem.Name;

                    switch (itemName)
                    {
                        case "Title":
                            e.DataFormItem.Name = AppResources.DataFormTitle;
                            break;
                        case "Description":
                            e.DataFormItem.Name = AppResources.DataFormDescription;
                            break;
                        case "PrayerFor":
                            e.DataFormItem.Name = AppResources.DataFormFor;
                            break;
                        case "PrayerType":
                            e.DataFormItem.Name = AppResources.DataFormType;
                            break;
                        case "PryrStatus":
                            e.DataFormItem.Name = AppResources.DataFormStatus;
                            break;
                        case "PrayerVis":
                            e.DataFormItem.Name = AppResources.DataFormVisibility;
                            break;
                    }
                }
            }

Attachment: CallStack_885a584e.zip

2 Replies

JO Joel July 29, 2018 11:55 PM UTC

Please disregard my earlier ticket. I was assigning "e.DataFormItem.Name" when I should have been assigning "e.DataFormItem.LabelText. 


VR Vigneshkumar Ramasamy Syncfusion Team July 30, 2018 12:53 PM UTC

Hi Joel,  
 
We are glad to know that your requirement has been achieved. Please get in touch if need further assistance on this.  
 
Regards 
Vigneshkumar R 


Loader.
Up arrow icon