NetBlog主题
2024-08-07 17:12
733
//注意:gridView1为控件名,这个点击事件一样要注册才能触发这个事件private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e){ if(e.Column.Name== "DX$CheckboxSelectorColumn")//列的名称 { gridV…
2024-04-19 11:53
926
效果图下拉框设置核心代码using DevExpress.XtraEditors;using System;using System.Collections.Generic;namespace DXApplication1{ public partial class Form1 : DevExpress.XtraEditors.XtraForm { public Form1() { InitializeCo…
2024-04-09 18:30
1167
//设置 GridView属性 View-OptionsBehavior-EditorShowMode 设置为:Click//注册 RowCellClick事件 gridView2.RowCellClick += gridView2_RowCellClick;//事件代码private void gridView2_RowCellClick(object sender, RowCellClickEventArgs e){ //这是过虑条件是…
2024-04-05 15:23
928
//i:某行,TestResult:为Columns的FieldName的值,Gridview里面可以设置gridView1.SetRowCellValue(i, gridView1.Columns["TestResult"], "要设置的值");//或者gridView1.SetRowCellValue(i, "TestResult", "要设置的值");本文来自:www.luofenming.com…
2024-03-14 17:07
800
效果图设置步骤按钮的样式也可以设置ColumEdit--ButtonsStyle的样式给按钮添加按钮事件//点击事件代码private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e){ int i = this.gridView1.Focuse…
2023-08-31 17:07
1242
1、gridcontrol的gridViews的Optionsview里的RowAutoHeight设置为True2、在gridViews中Columns里选择对应的列,在ColumnEdit里选择MemoEdit控件
2022-05-29 12:08
2879
视频讲解地址 https://www.bilibili.com/video/BV1nY4y1V7LE效果图核心代码public partial class Form1 : Form{//原创来自 www.luofenming.compublic Form1(){InitializeComponent();}private void Form1_Load(object sender, EventArgs e){//读取配置信息Dictionarystring,…
2022-05-26 15:32
4460
视频讲解地址 https://www.bilibili.com/video/BV11Y411u7Gb先看一下效果图源码下载地址: https://pan.baidu.com/s/1A0GhycAIQPOEveBma9o8dg?pwd=d156 提取码: d156在这里我们是继承GridControl,重写基类的功能核心代码如下using DevExpress.XtraGrid.Views.Grid;using Sys…
2022-05-19 15:25
3185
先看一下 显示前后的效果没转之前转显示值之后的效果在这里 数值为1时显示A相,数值为2时显示B相 ,数值为3时显示C相 ,核心代码如下private void gridView1_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e){…
2022-04-22 11:58
10963
最近更新 2023-11-08效果图 注册样式事件this.gridView1.RowCellStyle += new DevExpress.XtraGrid.Views.Grid.RowCellStyleEventHandler(this.gridView1_RowCellStyle);this.gridView1.RowStyle += new DevExpress.XtraGrid.Views.Grid.RowStyleEventHandler(this.gri…