I'm trying implement DataGridVirtualizingQueryableCollectionViewSource like documentation: http://doc.xceedsoft.com/products/xceedwpfdatagrid/Xceed.Wpf.DataGrid.v4.5~Xceed.Wpf.DataGrid.DataGridVirtualizingQueryableCollectionViewSource.html
Using ObjectContext API everything is normal.
However when using DbContext API, the cells content aren't showed.
Does anyone know anything about this?
/// <summary>
/// WITH THIS WORKS.
/// </summary>
public partial class AdventureWorksEntities : ObjectContext
/// <summary>
/// WITH THIS DOES NOT WORK.
/// </summary>
public partial class AdventureWorksEntities : DbContext
My source below:
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid">
<Grid.Resources>
<xcdg:DataGridVirtualizingQueryableCollectionViewSource
x:Key="cvs_queryableSource"
QueryableSource="{Binding Path=QueryableSource}"/>
</Grid.Resources>
<xcdg:DataGridControl ItemsSource="{Binding Source={StaticResource cvs_queryableSource}}">
</xcdg:DataGridControl>
</Grid>
public partial class MainWindow : Window
{
public MainWindow()
{
this.DataContext = this;
InitializeComponent();
}
public IQueryable QueryableSource
{
get
{
if (m_queryable == null)
{
m_northwind = new AdventureWorksEntities();
m_queryable = m_northwind.Contact;
}
return m_queryable;
}
}
private AdventureWorksEntities m_northwind;
private IQueryable m_queryable;
}
Thank you!