I would like to use UltraDataSource as xamDataGrid's data source but get the error message that
UltraDataSource
_ultraDataSource = new UltraDataSource();xamDataGrid.DataSource = _ultraDataSource;
Cannot implicitly convert type 'Infragistics.Win.UltraWinDataSource.UltraDataSource' to 'System.Collections.IEnumerable'. An explicit conversion exists (are you missing a cast?)
I had the impression this should be possible since UltraDataSource implements IBindingList<>
What am I missing?
Many Thanks
Here is a sample of using a XamDataGrid with the UltraDataSource. To achieve this is simple, you just need to wrap the UltraDataSource into a class (aka ViewModel) which is then bound to the DataContext of your grid's parent or root window. Only after that will you then be able to bind the XamDataGrid to the UltraDataSource.
BoundToUltraDS.zip
Thanks Alex,
So I take it UltraDataSource cannot be used for XamDatagrid. I came to this idea since I saw a few people were referring to be doing this when I googled for it.
Hello,
The UltraDataSource does not implement IEnumerable and therefore cannot be directly used to set the XamDataGrid's DataSource property. The Windows Forms UltraGrid's DataSource property is of type Object which supports the UltraDataSource. However, the XamDataGrid's DataSource property requires a source object that implements IEnumerable.