SVN r307
SVN-Revision: r307
This commit is contained in:
@@ -57,7 +57,7 @@ namespace Lskj.Control
|
||||
/// <value>The grid view.</value>
|
||||
public override GridView GridView { get { return this.bandedGridView; } }
|
||||
|
||||
public BandedGridView BandedView { get { return this.bandedGridView; } }
|
||||
public BandedGridView BandedView { get { return this.bandedGridView; } }
|
||||
/// <summary>
|
||||
/// 粘贴表格数据时调用
|
||||
/// </summary>
|
||||
@@ -131,7 +131,15 @@ namespace Lskj.Control
|
||||
{
|
||||
GridColumn column = e.Column;
|
||||
GridColumnModel model = column.Tag as GridColumnModel;
|
||||
if (string.IsNullOrEmpty(model.MergeGroup)) return;
|
||||
if (model == null)
|
||||
{
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(model.MergeGroup))
|
||||
{
|
||||
return;
|
||||
}
|
||||
string[] fields = model.MergeGroup.Trim(',').Split(',');
|
||||
for (int i = 0; i < fields.Length; i++)
|
||||
{
|
||||
@@ -577,7 +585,7 @@ namespace Lskj.Control
|
||||
{
|
||||
bandedGridView.Bands.Add(gridBandEmpty);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
bandedGridView.Bands.Insert(0, gridBandEmpty);
|
||||
}
|
||||
@@ -877,16 +885,16 @@ namespace Lskj.Control
|
||||
{
|
||||
//只有一级表头为空的第一列会显示合计
|
||||
BandedGridColumn bandedGridColumn = gridColumn as BandedGridColumn;
|
||||
if (bandedGridColumn.OwnerBand!=null&&!string.IsNullOrWhiteSpace(bandedGridColumn.OwnerBand.Caption))
|
||||
if (bandedGridColumn.OwnerBand != null && !string.IsNullOrWhiteSpace(bandedGridColumn.OwnerBand.Caption))
|
||||
{
|
||||
isBlankHeader=false;
|
||||
isBlankHeader = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 设置底部合计
|
||||
if (gridColumn.VisibleIndex == 0 && isBlankHeader)//只有空白表头才设置 合计xxx行
|
||||
{
|
||||
|
||||
|
||||
bandedGridView.OptionsView.ShowFooter = true;
|
||||
gridColumn.Summary.AddRange(new GridSummaryItem[] { new GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Count, gridColumn.FieldName, "合计: {0:#,###}行") });
|
||||
if (SystemInfo.Instance.GroupSpecialMode)
|
||||
@@ -894,7 +902,7 @@ namespace Lskj.Control
|
||||
//bandedGridView.GroupSummary.Add(new GridGroupSummaryItem(DevExpress.Data.SummaryItemType.Count, gridColumn.FieldName, gridColumn, "合计: {0:#,###}行"));
|
||||
bandedGridView.OptionsView.GroupFooterShowMode = GroupFooterShowMode.VisibleAlways;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
bandedGridView.GroupSummary.AddRange(new GridSummaryItem[] { new GridGroupSummaryItem(DevExpress.Data.SummaryItemType.Count, gridColumn.FieldName, null, "合计: {0:#,###}行") });
|
||||
}
|
||||
@@ -905,13 +913,13 @@ namespace Lskj.Control
|
||||
{
|
||||
bandedGridView.OptionsView.ShowFooter = true;
|
||||
gridColumn.Summary.AddRange(new GridSummaryItem[] { new GridColumnSummaryItem((!string.IsNullOrEmpty(model.sumCalc) || !string.IsNullOrEmpty(model.SumCond) || model.isSumMerge) ? SummaryItemType.Custom : SummaryItemType.Sum, gridColumn.FieldName, model.SumText + "{0:" + model.DataFormat + "}") });
|
||||
|
||||
|
||||
if (SystemInfo.Instance.GroupSpecialMode)
|
||||
{
|
||||
bandedGridView.GroupSummary.Add(new GridGroupSummaryItem((!string.IsNullOrEmpty(model.sumCalc) || !string.IsNullOrEmpty(model.SumCond) || model.isSumMerge) ? SummaryItemType.Custom : SummaryItemType.Sum, gridColumn.FieldName, gridColumn, model.SumText + "{0:" + model.DataFormat + "}"));
|
||||
bandedGridView.OptionsView.GroupFooterShowMode = GroupFooterShowMode.VisibleAlways;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
bandedGridView.GroupSummary.AddRange(new GridSummaryItem[] { new GridGroupSummaryItem((!string.IsNullOrEmpty(model.sumCalc) || !string.IsNullOrEmpty(model.SumCond) || model.isSumMerge) ? SummaryItemType.Custom : SummaryItemType.Sum, gridColumn.FieldName, null, model.SumText + "{0:" + model.DataFormat + "}") });
|
||||
}
|
||||
@@ -932,7 +940,6 @@ namespace Lskj.Control
|
||||
protected override void OnGridViewSummaryCalculate(object sender, CustomSummaryEventArgs e)
|
||||
{
|
||||
bool isSum = false;
|
||||
|
||||
var gridView = sender as DevExpress.XtraGrid.Views.BandedGrid.BandedGridView;
|
||||
GridSummaryItem gridSummaryItem = e.Item as GridSummaryItem;
|
||||
GridColumn gridColumn = gridView.Columns[gridSummaryItem.FieldName] as GridColumn;
|
||||
@@ -1131,7 +1138,7 @@ namespace Lskj.Control
|
||||
if (col.VisibleIndex == 0)
|
||||
{
|
||||
col.Summary.AddRange(new GridSummaryItem[] { new GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Count, col.FieldName, "合计: {0:#,###}行") });
|
||||
|
||||
|
||||
if (SystemInfo.Instance.GroupSpecialMode)
|
||||
{
|
||||
//bandedGridView.GroupSummary.Add(new GridGroupSummaryItem(DevExpress.Data.SummaryItemType.Count, col.FieldName, col, "合计: {0:#,###}行"));
|
||||
@@ -1160,7 +1167,7 @@ namespace Lskj.Control
|
||||
{
|
||||
isShowFooter = true;
|
||||
col.Summary.AddRange(new GridSummaryItem[] { new GridColumnSummaryItem(SummaryItemType.Sum, col.FieldName, "{0:}") });
|
||||
|
||||
|
||||
if (SystemInfo.Instance.GroupSpecialMode)
|
||||
{
|
||||
bandedGridView.GroupSummary.Add(new GridGroupSummaryItem(DevExpress.Data.SummaryItemType.Sum, col.FieldName, col, "{0:}"));
|
||||
@@ -1253,8 +1260,7 @@ namespace Lskj.Control
|
||||
{
|
||||
if (e.Column.Tag == null) return;
|
||||
GridColumnModel model = e.Column.Tag as GridColumnModel;
|
||||
|
||||
|
||||
if (model == null) return;
|
||||
//值改变时,如果是验证是否重复的列报错就清除
|
||||
if (RepeatedVerificationNames.Count > 0)
|
||||
{
|
||||
@@ -1268,8 +1274,6 @@ namespace Lskj.Control
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GridView gridView = this.gridControl.MainView as GridView;
|
||||
int rowHandle = gridView.GetDataSourceRowIndex(e.RowHandle);
|
||||
DataTable dataTable = this.gridControl.DataSourceTable();
|
||||
@@ -1339,34 +1343,6 @@ namespace Lskj.Control
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:重写BandedGridViewKeyDown</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
@@ -1919,7 +1895,7 @@ namespace Lskj.Control
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
public override bool VerifyNull()
|
||||
public override bool VerifyNull()
|
||||
{
|
||||
DataTable table = this.GridControl.DataSourceTable().TrimEmptyRows();
|
||||
List<GridColumnModel> columns = this.ColumnList.FindAll(x => x.CanNull);
|
||||
@@ -2998,7 +2974,7 @@ namespace Lskj.Control
|
||||
{
|
||||
string groupText = GridGroupRowInfo.GroupText;
|
||||
int endindex = groupText.LastIndexOf("行");
|
||||
if(!SystemInfo.Instance.GroupSpecialMode) groupText = groupText.Substring(startindex + 1, endindex - startindex - 1).Trim();
|
||||
if (!SystemInfo.Instance.GroupSpecialMode) groupText = groupText.Substring(startindex + 1, endindex - startindex - 1).Trim();
|
||||
if (!(this.ChartTable.Rows.Cast<DataRow>().FirstOrDefault(x => x["key"] == GridGroupRowInfo.EditValue + "") != null))
|
||||
{
|
||||
if (BaseImpl.HasExistsTable(ResourceKeys.SettingGrouprptab))
|
||||
|
||||
Reference in New Issue
Block a user