/// <summary> /// Gets the filter field control. /// </summary> /// <param name="filterField">The filter field.</param> /// <returns></returns> private static DataViewFilter GetFilterFieldControl(FilterField filterField) { if (filterField.ShowCheckbox && !filterField.CheckBoxChecked.GetValueOrDefault(true)) { return(null); } DataViewFilter filter = new DataViewFilter(); filter.Guid = filterField.DataViewFilterGuid; filter.ExpressionType = FilterExpressionType.Filter; filter.Expanded = filterField.Expanded; if (filterField.FilterEntityTypeName != null) { filter.EntityTypeId = EntityTypeCache.Get(filterField.FilterEntityTypeName).Id; filter.Selection = filterField.GetSelection(); filter.RelatedDataViewId = filterField.GetRelatedDataViewId(); } return(filter); }