修改生成Dgv 表头模式
This commit is contained in:
parent
3c2904e860
commit
3f65db5432
@ -7,7 +7,7 @@ $end
|
||||
$foreach(filedInfo in filedInfos)
|
||||
${filedInfo["field_name"]}Column.HeaderText = "${filedInfo["comment"]}";
|
||||
$end
|
||||
${dgv_name}.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.ColumnHeader;
|
||||
${dgv_name}.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
${dgv_name}.AutoGenerateColumns = true;
|
||||
|
||||
$if(timeFiledStr != "")
|
||||
|
@ -36,7 +36,7 @@ $if(isGenOperationColumn)
|
||||
if (cols.Count > 0)
|
||||
this.${dgv_name}.FirstDisplayedScrollingColumnIndex = cols.Count - 2;
|
||||
$end
|
||||
${dgv_name}.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.ColumnHeader;
|
||||
${dgv_name}.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
DataTable data = DbHelperMySQL.Query("select * from ${sql_table_name}");
|
||||
this.${dgv_name}.DataSource = data;
|
||||
|
||||
|
@ -37,7 +37,7 @@ $if(isGenOperationColumn)
|
||||
if (cols.Count > 0)
|
||||
this.${dgv_name}.FirstDisplayedScrollingColumnIndex = cols.Count - 2;
|
||||
$end
|
||||
${dgv_name}.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.ColumnHeader;
|
||||
${dgv_name}.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
DataTable data = DbHelperMySQL.Query($"select * from ${sql_table_name}");
|
||||
this.${dgv_name}.DataSource = data;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user