Bind ItemSource to ExpandoObjects

I can't all binding to work using ExpandoObjects. Following this (see below) KB article, I would assume this would work.

https://www.syncfusion.com/kb/6904/how-to-bind-dynamic-data-object-with-sfdatagrid

I'm able to get the correct amount of rows and correct column headers, but all the data is empty. It doesn't seem as straight forward as this KB shows.

Any thoughts?



5 Replies

VR Vigneshkumar Ramasamy Syncfusion Team September 19, 2018 07:30 AM UTC

 
Hi Mark,  
  
Thanks for contacting Syncfusion support.  
  
We have checked your query for Bind ItemSource to ExpandoObjects. We have tested the sample attached in the KB documentation in the latest version of NuGet and the sample is working as excepted for ExpandoObjects. We have also republished the KB with the Updated sample. We have attached the screenshot for your reference.  
  
    
  
We have attached a prepared sample and you download from the following link  
  
Regards,  
Vigneshkumar R 



UN Unknown Syncfusion Team September 19, 2018 01:31 PM UTC

Sorry - this submission was meant for Xamarin.Forms. Can you attach a Forms example?


VR Vigneshkumar Ramasamy Syncfusion Team September 20, 2018 06:50 AM UTC

Hi Mark,  
  
Thanks for the Update.  
  
We deeply regret that ExpandoObjects does not supports for the Xamarin forms this is due to the limitation of the Xamarin product without a JIT. So, it is not possible to Bind ExpandoObjects to ItemSource of the Datagrid in the Xamarin forms. Please refer the below ExpandoObject MSDN documentation link.  
  
  
  
ExpandoObject Support only the below metioned platforms.  
   
  
The same issue was already reported in the Bugzilla by us and kindly refer the following link.  
  
  
Regards,  
Vigneshkumar R 



UN Unknown Syncfusion Team September 20, 2018 01:56 PM UTC

Is there any way to achieve what I'm trying to do then? I have a table that contains data series and time data. I need to be able to add as many columns(series) as I want to the table. So when I load it, I don't know how many I'm going to have, Expando really seemed to be the way to go since I can't use a DataTable.


VR Vigneshkumar Ramasamy Syncfusion Team September 21, 2018 11:35 AM UTC

Hi Mark,  
  
We have analyzed your last updated query for the Expando objects support in SfDataGrid for the Xamarin.forms. Since Xamarin forms does not supports for the ExpandoObjects due to imitation of the Xamarin product without a JIT as we have mentioned clearly in the last update with the MSDN documenation link. So, we could not support for the Expando objects in SfDataGrid since it was not supported from the framework. We have already validated the reported use case and we have reported in the bugzilla link.  Please check the comments in the following link they have replied the same that it was the limitation of the Xamarin product without a JIT.    
   
  
Kindly follow up the above link for the solution and we would also follow the same.  
  
Regards,  
Vigneshkumar R 


Loader.
Up arrow icon