dev gridControl 自定义绘制列头颜色】的更多相关文章

1.添加事件CustomDrawColumnHeader private void gvw1_CustomDrawColumnHeader(object sender, DevExpress.XtraGrid.Views.Grid.ColumnHeaderCustomDrawEventArgs e) { if (e.Column == null || (e.Column.AppearanceHeader.BackColor == Color.Empty && !e.Column.Appea…
/// <summary> /// 自定义计算列 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void user_GridControl_CustomSummary(object sender, CustomSummaryEventArgs e) { try {fore…
gridcontrol中添加按钮的步骤: 1. 把列的ColumnEdit属性设置为RepositoryItemButtonEdit 2. 把TextEditStyle属性设置为HideTextEditor; 3. 把Buttons的Kind属性设置为Glyph; 4. 把Buttons的HorzAlignment属性设置为Center; 添加事件: 有时可能遇到增加的单击事件,不能触发. 原因:设置了GridControl了Editable为false! 设置为true后,双击触发. 如果数据…
今天碰到有同事遇到这个方面的需求,贴一下吧. private void gvTop_CustomSummaryCalculate(object sender, CustomSummaryEventArgs e) { if (e.IsTotalSummary && e.SummaryProcess == CustomSummaryProcess.Finalize) { // 数据源 var data = this.gcTop.DataSource as List<StockOrderD…
using System; using System.Data; using System.Drawing; using System.Windows.Forms; using Yanwen.Logistics.Business.Logics; using Yanwen.Logistics.Business.Models.ExpressTransport; using Yanwen.Logistics.Desktop.Extensions; namespace Yanwen.Logistics.…
关键代码: /// <summary> /// 为列头绘制CheckBox /// </summary> /// <param name="view">GridView</param> /// <param name="checkItem">RepositoryItemCheckEdit</param> /// <param name="fieldName">需要…
首先新建一个Win Form测试项目,拖一个GridControl控件到窗体上. public partial class Form1 : Form { public Form1() { InitializeComponent(); } private Rectangle checkBoxColumnHeaderRect = Rectangle.Empty; private GridColumn checkBoxColumn = null; private void gridView1_Cust…
Dev控件GridControl设置了一个右键菜单 this.gridControl1.ContextMenu = contextMenu2; 而GridControl在运行排序的时候,即 gridview1->OptionsCustomization->AllowSort设为true时,控件自带一个英文的右键菜单如下 这样当点击表列头时,就会出现下面的两个右键菜单重叠问题.   这样当点击表列头时,就会出现下面的两个右键菜单重叠问题. 解决办法: privatevoid gridView1_…
关键代码: /// <summary> /// 同步列头checkbox与列中checkbox状态 /// </summary> /// <param name="view">GridView</param> /// <param name="fieldeName">需要绘制Checkbox的列名</param> /// <param name="e">Mouse…
上次修改了TableView.RowStyle,导致了一个问题:覆盖了GridControl默认的选中行颜色. 于是需要重写选中行的颜色. 刚开始的想法是: <dxg:TableView> <dxg:TableView.RowStyle> <Style TargetType="{x:Type dxg:GridRowContent}"> <Style.Triggers> <Trigger Property="IsFocuse…