internal void OnAutoFilterValuesChanged(AutoFilterValuesChangedEventArgs e) { if (this.AutoFilterValuesChanged != null) { this.AutoFilterValuesChanged(this, e); } }
private void RaiseDetailDescriptionAutoFilterValuesChangedEvent(AutoFilterValuesChangedEventArgs e) { // Forward this change notification to the root CollectionView // or CollectionViewSource if (this.DetailDescriptionAutoFilterValuesChanged != null) { this.DetailDescriptionAutoFilterValuesChanged(e); } }
internal void RaiseAutoFilterValuesChangedEvent( AutoFilterValuesChangedEventArgs e ) { // This will not be raised for Details since the ParentCollectionViewSourceBase // is always null for a detail. The event will be raised by the // DataGridDetailDescription.AutoFilterValuesChanged internal Action // to assert only 1 event is sent to the user event if there are more than // 1 DataGridContext expanded. if( this.AutoFilterValuesChanged != null ) this.AutoFilterValuesChanged( this, e ); if( m_parentCollectionViewSourceBase != null ) m_parentCollectionViewSourceBase.OnAutoFilterValuesChanged( e ); }
private void OnAutoFilterValuesChanged( object sender, NotifyCollectionChangedEventArgs e ) { this.OnProxyAutoFilterValuesChanged( this, e ); IList autoFilterValues = sender as IList; Debug.Assert( autoFilterValues != null ); string fieldName = this.GetFieldNameFromAutoFitlerValues( autoFilterValues ); Debug.Assert( fieldName != null ); Debug.Assert( m_autoFilterValues != null ); Debug.Assert( m_autoFilterValues[ fieldName ] == autoFilterValues ); DataGridItemPropertyBase dataGridItemProperty = this.ItemProperties[ fieldName ]; Debug.Assert( dataGridItemProperty != null ); ObservableCollection<DataGridItemPropertyBase> autoFilteredItemProperties = this.AutoFilteredDataGridItemProperties; Debug.Assert( autoFilteredItemProperties != null ); // If we are filtered if( autoFilterValues.Count > 0 ) { // If this is a newly filtered DataGridItemProperty if( !autoFilteredItemProperties.Contains( dataGridItemProperty ) ) { autoFilteredItemProperties.Add( dataGridItemProperty ); } } else { // There is no more filter values for this DataGridItemProperty, // remove it from m_autoFilteredItems. if( dataGridItemProperty != null ) { autoFilteredItemProperties.Remove( dataGridItemProperty ); } } if( this.AutoFilterMode != AutoFilterMode.None ) { AutoFilterValuesChangedEventArgs autoFilterValuesChangedEventArgs = new AutoFilterValuesChangedEventArgs( m_parentDetailDescription, dataGridItemProperty, autoFilterValues, e ); this.RaiseAutoFilterValuesChangedEvent( autoFilterValuesChangedEventArgs ); m_excludedItemPropertyFromDistinctValueCalculation = dataGridItemProperty; try { // The refresh may be defered, if it's the case, m_excludedItemPropertyFromDistinctValueCalculation will // not be considered. This behavior is what we want since a defered refresh can mean aother operation // altered the items of the source so we want to rebuild the distinct value. this.Refresh(); } finally { m_excludedItemPropertyFromDistinctValueCalculation = null; } } }
private void RaiseDetailDescriptionAutoFilterValuesChangedEvent( AutoFilterValuesChangedEventArgs e ) { // Forward this change notification to the root CollectionView // or CollectionViewSource if( this.DetailDescriptionAutoFilterValuesChanged != null ) this.DetailDescriptionAutoFilterValuesChanged( e ); }
internal void OnAutoFilterValuesChanged( AutoFilterValuesChangedEventArgs e ) { if( this.AutoFilterValuesChanged != null ) this.AutoFilterValuesChanged( this, e ); }