예제 #1
0
        protected internal override void OnQueryItemsCompleted(VirtualPage page, AsyncQueryInfo queryInfo, object[] fetchedItems)
        {
            DataGridVirtualizingQueryableCollectionView collectionView = this.CollectionView as DataGridVirtualizingQueryableCollectionView;

            // The VirtualPageManager was Disposed
            if (collectionView == null)
            {
                return;
            }

            using (collectionView.DeferRefresh())
            {
                base.OnQueryItemsCompleted(page, queryInfo, fetchedItems);
            }
        }
        internal DataGridVirtualizingQueryableCollectionViewGroupRoot(
            DataGridVirtualizingQueryableCollectionView collectionView,
            object pageManagerSyncRoot,
            bool isBottomLevel)
            : base(null, -1, 0, null, -1, isBottomLevel)
        {
            m_parentCollectionView = collectionView;
            m_queryableSource      = m_parentCollectionView.QueryableSource;

            if (m_queryableSource != null)
            {
                m_primaryKeyPropertyNames = m_queryableSource.FindPrimaryKeys();
                // Primary key optimizations are only possible when only one primary key is identified in the source.
                // When dealing with sources defining more than one primary key, we would need to know in which order
                bool supportsPrimaryKeyOptimizations = ((m_primaryKeyPropertyNames != null) && (m_primaryKeyPropertyNames.Length == 1));

                m_virtualPageManager = new DataGridLINQPageManager(collectionView,
                                                                   pageManagerSyncRoot,
                                                                   supportsPrimaryKeyOptimizations);
            }
        }
예제 #3
0
 public DataGridLINQPageManager(DataGridVirtualizingQueryableCollectionView collectionView, object syncRoot, bool supportsPrimaryKeyOptimizations)
     : base(collectionView)
 {
     m_supportsPrimaryKeyOptimizations = supportsPrimaryKeyOptimizations;
     m_syncRoot = syncRoot;
 }