SVN-Revision: r411
This commit is contained in:
tdx
2025-03-27 05:54:41 +00:00
parent f7f45955e4
commit 53b57f4417
2 changed files with 12 additions and 34 deletions
+8 -30
View File
@@ -51,7 +51,7 @@
this.pl_buttom.Controls.Add(this.lblTotal); this.pl_buttom.Controls.Add(this.lblTotal);
this.pl_buttom.Dock = System.Windows.Forms.DockStyle.Bottom; this.pl_buttom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pl_buttom.Location = new System.Drawing.Point(0, 371); this.pl_buttom.Location = new System.Drawing.Point(0, 371);
this.pl_buttom.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.pl_buttom.Margin = new System.Windows.Forms.Padding(4);
this.pl_buttom.Name = "pl_buttom"; this.pl_buttom.Name = "pl_buttom";
this.pl_buttom.Size = new System.Drawing.Size(825, 41); this.pl_buttom.Size = new System.Drawing.Size(825, 41);
this.pl_buttom.TabIndex = 2; this.pl_buttom.TabIndex = 2;
@@ -64,7 +64,7 @@
this.lblTotal.Location = new System.Drawing.Point(8, 11); this.lblTotal.Location = new System.Drawing.Point(8, 11);
this.lblTotal.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lblTotal.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblTotal.Name = "lblTotal"; this.lblTotal.Name = "lblTotal";
this.lblTotal.Size = new System.Drawing.Size(144, 18); this.lblTotal.Size = new System.Drawing.Size(117, 14);
this.lblTotal.TabIndex = 2; this.lblTotal.TabIndex = 2;
this.lblTotal.Text = "合计:0,平均值:0"; this.lblTotal.Text = "合计:0,平均值:0";
// //
@@ -77,7 +77,7 @@
this.pl_main.Controls.Add(this.gridControl); this.pl_main.Controls.Add(this.gridControl);
this.pl_main.Dock = System.Windows.Forms.DockStyle.Fill; this.pl_main.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_main.Location = new System.Drawing.Point(0, 0); this.pl_main.Location = new System.Drawing.Point(0, 0);
this.pl_main.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.pl_main.Margin = new System.Windows.Forms.Padding(4);
this.pl_main.Name = "pl_main"; this.pl_main.Name = "pl_main";
this.pl_main.Size = new System.Drawing.Size(825, 371); this.pl_main.Size = new System.Drawing.Size(825, 371);
this.pl_main.TabIndex = 3; this.pl_main.TabIndex = 3;
@@ -87,7 +87,7 @@
this.panelControl1.BackColor = System.Drawing.Color.White; this.panelControl1.BackColor = System.Drawing.Color.White;
this.panelControl1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelControl1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelControl1.Location = new System.Drawing.Point(693, 345); this.panelControl1.Location = new System.Drawing.Point(693, 345);
this.panelControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelControl1.Margin = new System.Windows.Forms.Padding(4);
this.panelControl1.Name = "panelControl1"; this.panelControl1.Name = "panelControl1";
this.panelControl1.Size = new System.Drawing.Size(127, 22); this.panelControl1.Size = new System.Drawing.Size(127, 22);
this.panelControl1.TabIndex = 5; this.panelControl1.TabIndex = 5;
@@ -96,13 +96,13 @@
// gridControl // gridControl
// //
this.gridControl.Dock = System.Windows.Forms.DockStyle.Fill; this.gridControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridControl.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.gridControl.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(4);
gridLevelNode1.RelationName = "Level1"; gridLevelNode1.RelationName = "Level1";
this.gridControl.LevelTree.Nodes.AddRange(new DevExpress.XtraGrid.GridLevelNode[] { this.gridControl.LevelTree.Nodes.AddRange(new DevExpress.XtraGrid.GridLevelNode[] {
gridLevelNode1}); gridLevelNode1});
this.gridControl.Location = new System.Drawing.Point(0, 0); this.gridControl.Location = new System.Drawing.Point(0, 0);
this.gridControl.MainView = this.gridView; this.gridControl.MainView = this.gridView;
this.gridControl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.gridControl.Margin = new System.Windows.Forms.Padding(4);
this.gridControl.Name = "gridControl"; this.gridControl.Name = "gridControl";
this.gridControl.Size = new System.Drawing.Size(825, 371); this.gridControl.Size = new System.Drawing.Size(825, 371);
this.gridControl.TabIndex = 4; this.gridControl.TabIndex = 4;
@@ -145,27 +145,5 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.pl_main); this.Controls.Add(this.pl_main);
this.Controls.Add(this.pl_buttom); this.Controls.Add(this.pl_buttom);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "GridControlEx";
this.Size = new System.Drawing.Size(825, 412);
((System.ComponentModel.ISupportInitialize)(this.pl_buttom)).EndInit();
this.pl_buttom.ResumeLayout(false);
this.pl_buttom.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_main)).EndInit();
this.pl_main.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridControl)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridView)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraEditors.PanelControl pl_main;
protected System.Windows.Forms.Label lblTotal;
public DevExpress.XtraGrid.GridControl gridControl;
private DevExpress.XtraGrid.Views.Grid.GridView gridView;
private System.Windows.Forms.Panel panelControl1;
public DevExpress.XtraEditors.PanelControl pl_buttom;
}
}
+4 -4
View File
@@ -456,7 +456,7 @@ namespace Lskj.Control
{ {
var subField = column.Tag as GridColumnModel; var subField = column.Tag as GridColumnModel;
if (subField == null) continue; if (subField == null) continue;
string dynamicFieldName = column.FieldName; string dynamicFieldName = column.FieldName;
object updatedValue = updatedRow[dynamicFieldName]; object updatedValue = updatedRow[dynamicFieldName];
@@ -6691,13 +6691,13 @@ namespace Lskj.Control
FieldName = normalCol.FieldName, FieldName = normalCol.FieldName,
Caption = normalCol.FieldText, Caption = normalCol.FieldText,
Width = normalCol.Width, Width = normalCol.Width,
Visible = true, Visible = normalCol.Visible,
Tag = normalCol, Tag = normalCol,
MinWidth = normalCol.Width, MinWidth = normalCol.Width,
MaxWidth = normalCol.Width, MaxWidth = normalCol.Width,
OptionsColumn = { FixedWidth = true } // <-- 明确设置此属性 OptionsColumn = { AllowEdit = normalCol.Edit, FixedWidth = true }
}; };
bandedGridControlEx.SetColumnFormat(col, normalCol);
normalBand.Columns.Add(col); normalBand.Columns.Add(col);
bandedGridControlEx.BandedView.Columns.Add(col); bandedGridControlEx.BandedView.Columns.Add(col);
} }