private static void PrefilterCriteriaChanged(object sender, EventArgs e) { var pivotGrid = (MVCxPivotGrid)sender; if (pivotGrid.IsCallback || pivotGrid.IsPrefilterPopupVisible) { return; } AvrPivotGridModel model = GetModelFromSession(pivotGrid.Request); bool hasChanges = (model.PivotSettings.FilterCriteriaString != pivotGrid.Prefilter.CriteriaString); if (hasChanges) { model.PivotSettings.HasChanges = true; model.PivotSettings.FilterCriteriaString = pivotGrid.Prefilter.CriteriaString; bool isNewObject; string errorMessage; model.PivotData = LayoutPivotGridHelper.GetPivotData(model.PivotSettings, out isNewObject, out errorMessage); LayoutPivotGridHelper.AddMissedValues(model, false); } pivotGrid.JSProperties["cpNeedCallback"] = true; pivotGrid.Prefilter.Enabled = false; }
public LayoutValidateResult LoadPivotFromDB(AvrPivotGridData model, IList <IAvrPivotGridField> avrFields, bool isNewObject) { if ((PivotGridXmlVersion)LayoutRow.intPivotGridXmlVersion == PivotGridXmlVersion.Version5) { throw new AvrDbException("Layout has version 5 format. It's not supported."); } if (!isNewObject) { AvrPivotGridHelper.LoadSearchFieldsVersionSixFromDB(avrFields, LayoutSearchFieldTable, LayoutRow.idfsDefaultGroupDate); LoadPivotFilterVersionSixFromDB(); } AvrPivotGridHelper.LoadExstraSearchFieldsProperties(avrFields, LayoutSearchFieldTable); AvrPivotGridHelper.SwapOriginalAndCopiedFieldsIfReversed(avrFields); var result = new LayoutValidateResult(); LayoutBaseValidator validator = LayoutPivotGridHelper.CreateLayoutComplexityValidator(); if (LayoutRow.blnShowMissedValuesInPivotGrid) { result = AvrPivotGridHelper.AddMissedValuesAndValidateComplexity(model, avrFields, validator); } if (!result.IsCancelOrUserDialogCancel()) { result = AvrPivotGridHelper.FillEmptyValuesAndValidateComplexity(model, avrFields, validator); } return(result); }