private void UpdateConnectionState()
    {
      // Never update the ConnectionState when disconnected
      // from the CollectionView or Disposed since another
      // VirtualPageManager will take care or updating it
      if( !this.IsConnected || this.IsDisposed )
        return;

      DataGridConnectionState state = DataGridConnectionState.Idle;
      object error = null;

      if( m_asyncCommitInfosInError != null )
      {
        state = DataGridConnectionState.Error;
        Debug.Assert( m_asyncCommitInfosInError.Count > 0 );
        error = m_asyncCommitInfosInError.First.Value.Error;
      }
      else if( m_asyncQueryInfosInError != null )
      {
        state = DataGridConnectionState.Error;
        Debug.Assert( m_asyncQueryInfosInError.Count > 0 );
        error = m_asyncQueryInfosInError.First.Value.Error;
      }
      else if( m_asyncCommitInfosInProgress.Count > 0 )
      {
        state = DataGridConnectionState.Committing;
      }
      else if( m_asyncQueryInfosInProgress.Count > 0 )
      {
        state = DataGridConnectionState.Loading;
      }

      m_collectionView.UpdateConnectionState( state, error );
    }
Example #2
0
 private void SetConnectionState( DataGridConnectionState value )
 {
   if( value == DataGridConnectionState.Idle )
   {
     this.ClearValue( DataGridControl.ConnectionStatePropertyKey );
   }
   else
   {
     this.SetValue( DataGridControl.ConnectionStatePropertyKey, value );
   }
 }
 internal void UpdateConnectionState( DataGridConnectionState connectionState, object error )
 {
   this.ConnectionState = connectionState;
   this.ConnectionError = error;
 }
 internal void UpdateConnectionState(DataGridConnectionState connectionState, object error)
 {
     this.ConnectionState = connectionState;
     this.ConnectionError = error;
 }