SVN r524
SVN-Revision: r524
This commit is contained in:
@@ -2122,7 +2122,7 @@ namespace Lskj.Control
|
||||
//}
|
||||
if (!string.IsNullOrEmpty(model.EnableCond))
|
||||
{
|
||||
GridColumnModel[] columns = this.ColumnList.Where(x => x.EnableCond.Contains("{" + model.FieldName + "}")).ToArray();
|
||||
GridColumnModel[] columns = this.ColumnList.Where(x => x.EnableCond.Contains("{" + model.FieldName + "}")).ToArray();
|
||||
DataRow rowItem = this.gridView.GetDataRow(rowHandler);
|
||||
foreach (GridColumnModel item in columns)
|
||||
{
|
||||
@@ -7713,7 +7713,7 @@ namespace Lskj.Control
|
||||
{
|
||||
GridColumnModel model = item.Tag as GridColumnModel;
|
||||
//修改
|
||||
if (Modify)
|
||||
if (Modify && ModifyFields.IndexOf(item.FieldName + ",", StringComparison.OrdinalIgnoreCase) != -1)
|
||||
{
|
||||
item.OptionsColumn.AllowEdit = ModifyFields.IndexOf(item.FieldName + ",", StringComparison.OrdinalIgnoreCase) != -1;
|
||||
item.OptionsColumn.ReadOnly = !item.OptionsColumn.AllowEdit;
|
||||
@@ -7728,6 +7728,11 @@ namespace Lskj.Control
|
||||
item.AppearanceHeader.Options.UseForeColor = true;
|
||||
item.AppearanceHeader.ForeColor = ColorTranslator.FromHtml("#00000");
|
||||
}
|
||||
//if (model.CanNull)
|
||||
//{
|
||||
// item.AppearanceHeader.Options.UseForeColor = true;
|
||||
// item.AppearanceHeader.ForeColor = RequiredForceColor;
|
||||
//}
|
||||
|
||||
if (model.FieldType == ControlType.LabMemoEdit) item.OptionsColumn.AllowEdit = true;
|
||||
}
|
||||
@@ -7770,28 +7775,27 @@ namespace Lskj.Control
|
||||
//}
|
||||
}
|
||||
this.gridView.EndUpdate();
|
||||
}
|
||||
|
||||
//if (ColumnsList.Count == 0) ColumnsList = this.gridView.Columns.ToList();
|
||||
//if (ColumnsList.Count == 0) return;
|
||||
//this.gridView.Columns.Clear();
|
||||
//if (string.IsNullOrWhiteSpace(ColumnName))
|
||||
//{
|
||||
// this.gridView.Columns.Add(ColumnsList[0]);
|
||||
// return;
|
||||
//}
|
||||
//string[] ColumnNames = ColumnName.Split(',');
|
||||
|
||||
//foreach (GridColumn item in ColumnsList)
|
||||
//{
|
||||
// GridColumnModel model = item.Tag as GridColumnModel;
|
||||
// bool isContain = ColumnNames.Contains(model.FieldName) ? true : false;
|
||||
// if (isContain)
|
||||
// {
|
||||
// item.Visible = true;
|
||||
// this.gridView.Columns.Add(item);
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 动态修改列名
|
||||
/// </summary>
|
||||
public void SetColumnName(DataRow dataRow)
|
||||
{
|
||||
this.gridView.BeginUpdate();
|
||||
|
||||
foreach (GridColumn item in gridView.Columns)
|
||||
{
|
||||
GridColumnModel model = item.Tag as GridColumnModel;
|
||||
if (dataRow.Table.Columns.Contains(model.FieldName))
|
||||
{
|
||||
item.Caption = dataRow[model.FieldName]+"";
|
||||
item.Visible = !string.IsNullOrWhiteSpace(item.Caption);
|
||||
}
|
||||
}
|
||||
this.gridView.EndUpdate();
|
||||
//this.gridView.RefreshData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user