SVN-Revision: r300
This commit is contained in:
tdx
2025-03-07 01:55:43 +00:00
parent d1e732b8d7
commit 111f53d819
+13 -12
View File
@@ -107,7 +107,7 @@ namespace Lskj.ProductiSched
bandGcTop.SetEditColumns(DataModel.TopGridColumns, GridCustomColumnStruct.BaseMainGridView + DataModel.TopModuleModel.FormKey);
bandGcTop.SetGridRightMenus(BaseModuleImpl.GetBaseGridRightMenus(DataModel.TopModuleModel.FormKey), DataModel.TopSysModel);
bandGcTop.SetGridRowColors(BaseModuleImpl.GetBaseGridRowColors(DataModel.TopModuleModel.FormKey));
AddDataColumns(bandGcTop, true);
AddDataColumns(bandGcTop);
//下方表格
if (!string.IsNullOrEmpty(DataModel.BottomSysModel.ModuleCode))
{
@@ -331,8 +331,12 @@ namespace Lskj.ProductiSched
/// <summary>
/// 添加虚拟日期列
/// </summary>
private void AddDataColumns(BandedGridControlEx bandedGridControlEx, bool canSum = false)
private void AddDataColumns(BandedGridControlEx bandedGridControlEx)
{
if (bandedGridControlEx == bandGcTop)
{
bandedGridControlEx.BandedView.OptionsView.ShowFooter = true;
}
foreach (GridBand gridBand in bandedGridControlEx.BandedView.Bands)
{
gridBand.Fixed = FixedStyle.Left;
@@ -348,7 +352,7 @@ namespace Lskj.ProductiSched
gridBand.AppearanceHeader.Font = new Font("宋体", 9, FontStyle.Bold);
gridBand.AppearanceHeader.Options.UseTextOptions = true;
gridBand.AppearanceHeader.TextOptions.HAlignment = HorzAlignment.Center;
bandedGridControlEx.BandedView.Bands.AddRange(new GridBand[] { gridBand });
bandedGridControlEx.BandedView.Bands.Add(gridBand);
BandedGridColumn gridColumn = new BandedGridColumn();
gridColumn.AppearanceCell.Options.UseTextOptions = true;
gridColumn.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
@@ -359,17 +363,14 @@ namespace Lskj.ProductiSched
gridColumn.DisplayFormat.FormatType = FormatType.Numeric;
gridColumn.DisplayFormat.FormatString = "{0:#,##0.####}";
gridColumn.Visible = false;
gridBand.Columns.Add(gridColumn);
if (canSum)
if (bandedGridControlEx == bandGcTop)
{
gridColumn.Summary.AddRange(new GridSummaryItem[] { new GridColumnSummaryItem(SummaryItemType.Sum, gridColumn.FieldName, "{0:#,##0.####}") });
bandGcTop.BandedView.GroupSummary.Add(new GridGroupSummaryItem(SummaryItemType.Sum, gridColumn.FieldName, gridColumn, "{0:#,##0.####}"));
bandGcTop.BandedView.OptionsView.GroupFooterShowMode = DevExpress.XtraGrid.Views.Grid.GroupFooterShowMode.VisibleAlways;
GridColumnSummaryItem gridColumnSummaryItem = gridColumn.Summary.Add();
gridColumnSummaryItem.FieldName = gridColumn.FieldName;
gridColumnSummaryItem.DisplayFormat = "{0:#,##0.####}";
gridColumnSummaryItem.SummaryType = SummaryItemType.Sum;
}
}
if (canSum)
{
bandedGridControlEx.BandedView.OptionsView.ShowFooter = true;
gridBand.Columns.Add(gridColumn);
}
}
/// <summary>