public virtual SortType DetermineSortType(string field, Func <string, SortType> del) { if (PivotMaintExt.TryDetermineSortType(Base.DataScreen, field, out var sortType)) { return(sortType); } return(del(field)); }
public virtual void ChartSettings_RowUpdated(PXCache sender, PXRowUpdatedEventArgs e) { if (!e.ExternalCall) { return; } ChartSettings row = (ChartSettings)e.Row, oldRow = (ChartSettings)e.OldRow; if (row.CategoryField != oldRow.CategoryField && PivotMaintExt.IsFinPeriod(Base.DataScreen, row.CategoryField)) { sender.SetValue <ChartSettings.categorySortType>(row, SortTypeListAttribute.Legend); sender.SetValue <ChartSettings.categorySortOrder>(row, 0); // ascending } if (row.SeriesField != oldRow.SeriesField && PivotMaintExt.IsFinPeriod(Base.DataScreen, row.SeriesField)) { sender.SetValue <ChartSettings.seriesSortType>(row, SortTypeListAttribute.Legend); sender.SetValue <ChartSettings.seriesSortOrder>(row, 0); // ascending } }