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

DataFormDropDownItem when defining sfDataForm using XAML

Here is my sfDataForm XAML definition:

<dataForm:SfDataForm Grid.Row="0" DataObject="{Binding Competitor}" AutoGenerateItems="False">
                <dataForm:SfDataForm.Items>
                    <dataForm:DataFormDropDownItem Name="Athlete" LabelText="{x:Static res:Strings.CompetitorAthleteFieldName}" Editor="DropDown" ItemsSource="AthleteCollection" DisplayMemberPath="FullName"/>
                    <dataForm:DataFormNumericItem Name="Bib" LabelText="{x:Static res:Strings.CompetitorBibFieldName}" Editor="Numeric" FormatString="0"/>
                    <dataForm:DataFormTextItemBase Name="TeamName" LabelText="{x:Static res:Strings.CompetitorTeamNameFieldName}" Editor="Text"/>
                </dataForm:SfDataForm.Items>
            </dataForm:SfDataForm>

The Athlete field is an object that I want to select from the AthleteCollection observable collection using a dropdown list.
However, the DropDown control stays in a disabled state as it doesn't get populated with the AthleteCollection as defined in the ItemsSource.

I did try to use a binding syntax such as ItemsSource = {Binding AthleteCollection} but when I do that, I get the exception "Object reference not set to an instance of an object"

Testing was also done using a DataFormPickerItem but it doesn't work either.

Note that I follow an MVVM model and would like to minimize the code behind form and any hard dependencies.



5 Replies

AS Arun siva Syncfusion Team April 13, 2019 09:50 AM UTC

Hi Jean, 
 
Thank you for contacting Syncfusion support. 
 
Currently, we are analyzing the reported behavior “Binding ItemSource property to the DataForm DropDown editor doesn’t work in dataform” based on source and sample level, we will update you further details on this on two business days on 16th April 2019. We appreciate your patience until then. 
 
As of now you can set the ItemSource to the dropdown item in the behavior class to populate the items to drop down editor. 
 
Sample: DataForm. 
 
Kindly revert us if you have any concern. 
 
Regards, 
Arun Siva R 



SP Subburaj Pandian Veluchamy Syncfusion Team April 16, 2019 02:26 PM UTC

Hi Jean,  

Thank you for the update.

We can reproduce the issue “Binding ItemSource property to the DataForm DropDown editor doesn’t work in dataform” and we have logged issue report for the same. We will improve this and
it will be included in 2019 Volume 1 Service Pack 1 release which is estimated to be available by mid of May 2019. We appreciate your patience until then.  

You can track the status of this report through the following feedback link, 
 
 
Regards,
Subburaj Pandian V
 



JE Jean-Marc April 25, 2019 03:43 PM UTC

The link for the issue does not work!

Is the fix still planned for Service Pack 1 in May?

Thanks,
JMD


SP Subburaj Pandian Veluchamy Syncfusion Team April 26, 2019 05:51 AM UTC

Hi Jean, 

Regarding feedback link: We suspect that you have not checked-in with your registered mail ID, please login the Feedback portal link with your credentials, it will resolve the reported problem.  
 
Regarding issue fix: Yes, as promised we will fix and include the issue fix in our upcoming 2019 Volume 1 SP1 release which is expected to be available by mid of May 2019. 
 
Regards,
Subburaj Pandian V 



SP Subburaj Pandian Veluchamy Syncfusion Team May 15, 2019 10:19 AM UTC

Hi Jean, 
  
We are glad to announce that our Essential Studio 2019 Volume 1 SP1 Release v17.1.0.47 is rolled out with the issue fix “Binding ItemSource property to the DataForm DropDown editor doesn’t work in dataform” and is available for download under the following 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. 
 
Regards,
Subburaj Pandian V    


Loader.
Live Chat Icon For mobile
Up arrow icon