We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to assign DataFormItem to groups while using DataFormItemManagerExt

Thread ID:





147494 Sep 12,2019 02:24 PM UTC Oct 4,2019 06:40 AM UTC Xamarin.Forms 2
Tags: SfDataForm
Asked On September 12, 2019 02:24 PM UTC


I'm using subclass of DataFormItemManager and override GenerateDataFormItems for customize item of a DataForm.

How to assign items to groups? 

I have tried:

1. Assign value to Group Name. It throw exception  {System.NullReferenceException: Object reference not set to an instance of an object at Syncfusion.iOS.DataForm.DataFormItemManager.GenerateDataFormLayoutItems (Syncfusion.iOS.DataForm.DataFormItems dataFormItems, System.Int32& rowIndex) 

for example :  

 if (propertyInfo.Key == "Code")
      dataFormItem = new DataFormTextItem() { Name = propertyInfo.Key, Editor = "Text" , GroupName = "General" };

2. I suspect that the group is not exists, so i add it manually by code in the Page constructor. But it does not help.

                           DataFormGroupItem dataFormGroupItem = new DataFormGroupItem();
            dataFormGroupItem.GroupName = "General";

Karthikraja Arumugam [Syncfusion]
Replied On September 13, 2019 12:05 PM UTC

Hi Tung, 
Thank you for contacting Syncfusion support. 
We can able to reproduce the reported issue “While generating DataFormItem using DataFormItemManager class, null exception throws on change focus from DataFormItem which is inside DataFormGroupItem and logged an issue report for the same. We will fix the issue and include the issue fix in our upcoming volume 3 release which is planned to roll out at the end of September 2019. We appreciate your patience until then.  
You can track the status of this report through the following feedback link, 
Note: The provided feedback link is private, you need to login to view this feedback. 
After including the issue fix you can add DataFormItem to DataFormGroupItem and add DataFormGroupItem to DataForm ItemManager collection.  
Please refer the following code example for the same, 
protected override List<DataFormItemBase> GenerateDataFormItems(PropertyInfoCollection itemProperties, List<DataFormItemBase> dataFormItems) 
            var items = new List<DataFormItemBase>(); 
            DataFormGroupItem dataFormGroupItem = new DataFormGroupItem(); 
            foreach (var propertyInfo in itemProperties) 
                dataFormGroupItem.GroupName = "General"; 
                if (propertyInfo.Key == "Code") 
                    dataFormGroupItem.DataFormItems.Add(new DataFormTextItem() { Name = propertyInfo.Key, Editor = "Text", GroupName = "General" }); 
                    dataFormGroupItem.DataFormItems.Add(new DataFormTextItem() { Name = propertyInfo.Key, Editor = "Text", GroupName = "General" }); 
            return items; 
 Please let us know, if you need any further assistance. 
Karthik Raja A

Ajith Kumar Senthil Kumar [Syncfusion]
Replied On October 4, 2019 06:40 AM UTC

Hi Tung 
We are glad to announce that our Essential Studio 2019 Volume 3 Release version is rolled out with the mentioned issue “While generating DataFormItem using DataFormItemManager class, null exception throws on change focus from DataFormItem which is inside DataFormGroupItem” and is available for download under the following link.    
Nuget link:  
Release notes link:  
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.  


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon