SVN r429
SVN-Revision: r429
This commit is contained in:
@@ -729,6 +729,7 @@ namespace Lskj.Control
|
||||
int index = Convert.ToInt32(rowItem["orderid"]);
|
||||
bool visible = "1".Equals(rowItem["isVisible"] + "") && fieldWidth > 0;
|
||||
bool isFix = "True".Equals(rowItem["IfFixColumn"] + "", StringComparison.OrdinalIgnoreCase);
|
||||
string FilterInfo = rowItem.Table.Columns.Contains("FilterInfo") ? rowItem["FilterInfo"] + "" : "";//列筛选条件
|
||||
|
||||
GridColumnModel column = this.ColumnList.Find(x => x.FieldName == fieldName);
|
||||
BandedGridColumn gridColumn = this.bandedGridView.Columns.ColumnByName(fieldName);
|
||||
@@ -745,6 +746,7 @@ namespace Lskj.Control
|
||||
colObj.VisibleIndex = index;
|
||||
colObj.Width = fieldWidth;
|
||||
colObj.Visible = visible;
|
||||
if (!string.IsNullOrWhiteSpace(FilterInfo)) colObj.FilterInfo = new ColumnFilterInfo(FilterInfo);
|
||||
if (FieldText.Contains("|") && isFix)
|
||||
{
|
||||
FixLeftItemClick(colObj, new EventArgs());
|
||||
@@ -756,6 +758,34 @@ namespace Lskj.Control
|
||||
|
||||
}
|
||||
}
|
||||
//是否显示筛选器行
|
||||
if (customTable.Columns.Contains("DisplayFiltering") && "1".Equals(customTable.Rows[0]["DisplayFiltering"] + "")) this.bandedGridView.OptionsView.ShowAutoFilterRow = true;
|
||||
//分组序号
|
||||
if (customTable.Columns.Contains("GroupIndex"))
|
||||
{
|
||||
DataRow[] dataRows = customTable.Select("GroupIndex>-1");
|
||||
|
||||
for (int i = 0; i < dataRows.Length; i++)
|
||||
{
|
||||
DataRow row = dataRows.Cast<DataRow>().FirstOrDefault(x => Convert.ToInt32(x["GroupIndex"] + "") == i);
|
||||
if (row != null)
|
||||
{
|
||||
string fieldName = row["fieldName"] + "";
|
||||
int GroupIndex = row.Table.Columns.Contains("GroupIndex") ? Convert.ToInt32(row["GroupIndex"] + "") : -1;
|
||||
GridColumnModel column = this.ColumnList.Find(x => x.FieldName == fieldName);
|
||||
BandedGridColumn gridColumn = this.bandedGridView.Columns.ColumnByName(fieldName);
|
||||
if (column != null && !string.IsNullOrEmpty(fieldName) && gridColumn != null && gridColumn.Visible && gridColumn.Width > 0)
|
||||
{
|
||||
BandedGridColumn colObj = this.bandedGridView.Columns[fieldName];
|
||||
if (GroupIndex > -1)
|
||||
{
|
||||
colObj.GroupIndex = GroupIndex;
|
||||
this.bandedGridView.OptionsView.ShowGroupPanel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (BandedGridColumn col in this.bandedGridView.Columns)
|
||||
{
|
||||
DataRow a = customTable.Rows.Cast<DataRow>().FirstOrDefault(x => col.Name.Equals(x["fieldName"] + "", StringComparison.OrdinalIgnoreCase));
|
||||
@@ -883,11 +913,12 @@ namespace Lskj.Control
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
/// <param name="model">The model.</param>
|
||||
protected override void SetColumnSumming(GridColumn gridColumn, GridColumnModel model)
|
||||
|
||||
{
|
||||
bool isBlankHeader = true;//是空白一级列头
|
||||
if (gridColumn is BandedGridColumn)
|
||||
if (moduleModel != null && gridColumn is BandedGridColumn && moduleModel.BandedAddToEnd)
|
||||
{
|
||||
//只有一级表头为空的第一列会显示合计
|
||||
//只有一级表头为空的第一列会显示合计(设置了空白列加在最后才生效)
|
||||
BandedGridColumn bandedGridColumn = gridColumn as BandedGridColumn;
|
||||
if (bandedGridColumn.OwnerBand != null && !string.IsNullOrWhiteSpace(bandedGridColumn.OwnerBand.Caption))
|
||||
{
|
||||
@@ -1185,7 +1216,6 @@ namespace Lskj.Control
|
||||
if (colparame.Length > 3)
|
||||
{
|
||||
string dataFormat = colparame[3];
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(dataFormat))
|
||||
{
|
||||
col.DisplayFormat.FormatType = FormatType.Custom;
|
||||
|
||||
Reference in New Issue
Block a user