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
close icon

Display data from inner observablecollection

Does anyone know how you can bind to an observablecollection inside another observablecollection in c# UWP sfDataGrid?

3 Replies

GG Gowtham Gopalsamy Syncfusion Team November 7, 2019 04:22 PM UTC

Hi Graham,  
 
We have prepared the sample based on your requirement to  bind an observablecollection inside another observablecollection. We Couldn’t able to understand your query clearly. Please let us know you are using the collection like mentioned in the below code snippet, have attached the prepared sample in below . 
 
        public ObservableCollection<ObservableCollection<Parent>> Collection = new ObservableCollection<ObservableCollection<Parent>>(); 
 
 
In this case, we can’t bind the collection to the ItemSource in xaml based on index. We can able to set the ItemSource in code behind based on index. We have attached the sample please modified the sample as per your requirement or else please provide the more details about your requirement. 
 
  
Please let us know, if you require further assistance on this. 
    
Regards,    
Gowtham    



GR Graham November 8, 2019 11:19 AM UTC

Thanks for the info however still having issues as I cannot set Itemsource to my FastLapHistory which is inside my StatsList observablecollection, please can you let me know if there is anything else I can do to bind to this inner observablecollection.  I have attached the class file & below is the code to my observablecollection.

        public ObservableCollection<ObservableCollection<SessionStatistics>> StatsList = new ObservableCollection<ObservableCollection<SessionStatistics>>();


Attachment: SessionStatisticsClassfile_33ba5cc0.zip


GG Gowtham Gopalsamy Syncfusion Team November 11, 2019 05:53 PM UTC

Hi Graham 
   
Thank you for your patience . 
   
We have prepared the sample based on your attached code snippet. You can bind the inner observable collection and please refer the below sample. 
 
Please refer the sample link in below, 
 
 
We appreciate your patience until then.   
   
Regards,  
  
Gowtham 


Loader.
Live Chat Icon For mobile
Up arrow icon