internal object XtraCreateFilterConditionsItem(XtraItemEventArgs e) { ColumnFilterCondition filterCondition = new ColumnFilterCondition(); filterCollection.Add(filterCondition); return(filterCondition); }
private void AddSingleFilterCondition(string filterConditionString, ColumnFilterItem filterValue) { OwnerTreeList.FilteredVisibleNodes.Clear(); FilterConditionEnum condition; ColumnFilterCondition newCondition; if (filterValue is ColumnFilterBlanksItem) { newCondition = new ColumnFilterCondition(filterShowingColumn.FieldName, FilterConditionEnum.IsBlank, null, null); } else if (filterValue is ColumnFilterNonBlanksItem) { newCondition = new ColumnFilterCondition(filterShowingColumn.FieldName, FilterConditionEnum.IsNotBlank, null, null); } else { condition = (FilterConditionEnum)Enum.Parse(typeof(FilterConditionEnum), filterConditionString); newCondition = new ColumnFilterCondition(filterShowingColumn.FieldName, condition, filterValue.Value, filterValue.DisplayText); } for (int i = 0; i < OwnerTreeList.ColumnFilterConditions.Count; i++) { if (OwnerTreeList.ColumnFilterConditions[i].Column == filterShowingColumn) { OwnerTreeList.ColumnFilterConditions.RemoveAt(i); break; } } if (!(filterValue is ColumnFilterAllItem)) { OwnerTreeList.ColumnFilterConditions.Add(newCondition); } }
public void Assign(ColumnFilterCondition source) { Collection = source.Collection; FieldName = source.FieldName; Condition = source.Condition; Value = source.Value; DisplayText = source.DisplayText; }
public void Assign(ColumnFilterConditionCollection source) { Clear(); foreach (ColumnFilterCondition condition in source) { ColumnFilterCondition newCondition = new ColumnFilterCondition(); newCondition.Assign(condition); Add(newCondition); } }
public bool Contains(ColumnFilterCondition item) { return(List.Contains(item)); }
public int IndexOf(ColumnFilterCondition item) { return(List.IndexOf(item)); }
public int Add(ColumnFilterCondition item) { item.Collection = this; item.FilterConditionPropertyChanged += new FilterConditionPropertyChangedEventHandler(OnItemPropertyChanged); return(List.Add(item)); }