dev gridview表格按钮
固定列的位置

添加按钮控件位置,使用buttonEdit

添加按钮

按钮属性设置


按钮设置后的效果
//注册按钮事件
this.ribtndata.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(ribtndata_Click);
private void ribtndata_Click(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
{
if (e.Button.Index == 0)
{
//方法
}
if (e.Button.Index == 1)
{
//方法
}
}
动态生成按钮
private RepositoryItemButtonEdit m_HandleBtn = new RepositoryItemButtonEdit();
for (int i = ; i < str.Count(); i++)
{
btn.Buttons[].Kind = ButtonPredefines.Glyph;//初始的是有一个按钮
btn.Buttons[].Caption = str[];
btn.Buttons[].Appearance.Options.UseForeColor = true;
btn.Buttons[].Appearance.ForeColor = Color.Black;
if (i > )
{
btn.Buttons.Add(new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph
, str[i], -, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, null
, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None)
, new DevExpress.Utils.SerializableAppearanceObject() { ForeColor = Color.Blue, Options = { UseBorderColor = true } }
, "", null, null, true));
}
// btn.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
//new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph
// , "查看资料", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, null
// , new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None)
// , new DevExpress.Utils.SerializableAppearanceObject(), "", null, null, true),
//new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph
// , "处理", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, null
// , new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None)
// , new DevExpress.Utils.SerializableAppearanceObject(), "", null, null, true)});
}
btn.ButtonsStyle = BorderStyles.Default;
btn.TextEditStyle = TextEditStyles.HideTextEditor;
dev gridview表格按钮的更多相关文章
- Dev gridView中设置自适应列宽和日期显示格式、金额的显示格式
在Dev GridView控件中,数据库中表数据日期都是长日期格式(yyyy-MM-dd HH:mm:ss),但显示在控件变成短日期格式(yyyy-MM-dd),金额显示要显示精确的数值, 比如80. ...
- dev gridview指定单元格cell获取坐标
DevExpress.XtraGrid.Views.Grid.ViewInfo.GridViewInfo Info2 = gvQueryResult.GetViewInfo() as DevExpre ...
- Gridview表格控件
Gridview表格控件 效果图: 分析: 使用和ListvVew很像,都是经过适配器将数据绑定到控件上 具体步骤如下: 1.创建GridView控件,并指定列数 android:numColumns ...
- DevExpress 关于 GridView 表格编辑中 点击其他按钮里导致 值未取到处理
只需要给添加以下代码 在执行其他按钮前调 用一下 就可以了:主要是用来关闭编辑以及更新当前行编辑内容 this.gridControl1.FocusedView.CloseEditor(); this ...
- Dev GridView 属性说明
说明 Options OptionsBehavior 视图的行为选项 AllowIncrementalSearch 允许用户通过输入想得到的列值来定位行 AllowPartialRedrawOnS ...
- 关于gridview里加按钮事件的总结
1. onrowcommand="GridView1_RowCommand1" 在gridview申明时的属性里要有,然后找到闪电,双击 还有要把那个按钮行模板化,就是箭头里面的t ...
- DEV GridView嵌套
近来的DEV搞更多.试图寻找专业点的程序做,对这样一个小小的研究. 本篇是多么真实,现在的记录,可以通过点击这条线的子表的内容相关联的行中打开的列表.的影响,如下面的: 以下是实现过程: 1.设计器里 ...
- c#dev gridview 设置隔行换色等
1:禁止gridview编辑 2:隔行换色 介绍一些常用的gridcontrol设置. 1.设置隔行变色.首先设置显示隔行变色,步骤:OptionsView-->EnableAppearance ...
- 使用 Bolt 实现 GridView 表格控件
用 Bolt 实现了一个表格控件: 1. 提供 Insert,Remove,Get,Set 接口,可以为表格增删数据: 2. 通过 ItemClass, ItemSetDataFunc 属性来指定显 ...
随机推荐
- Nginx数据结构之内存池
基本结构 1. ngx_pool_t struct ngx_pool_s { ngx_pool_data_t d; size_t max; ngx_pool_t *current; ngx_chain ...
- 梯度提升树GBDT总结
提升树的学习优化过程中,损失函数平方损失和指数损失时候,每一步优化相对简单,但对于一般损失函数优化的问题,Freidman提出了Gradient Boosting算法,其利用了损失函数的负梯度在当前模 ...
- Flutter移动电商实战 --(10)使用FlutterSwiper制作轮播效果
1.引入flutter_swiper插件 flutter最强大的siwiper, 多种布局方式,无限轮播,Android和IOS双端适配. 好牛X得介绍,一般敢用“最”的一般都是神级大神,看到这个介绍 ...
- 设置Fedora能够使用root用户登录
1. 切换到root工作环境,因为一下操作必须拥有root权限 [ha@localhost ~]$ su root密码: 2. 编辑/etc/pam.d/gdm [root@localhost ha] ...
- git 命令简洁手册
1.从当前目录初始化 git init 2.对文件进行跟踪 或 将已跟踪的文件放到暂缓区 或 把有冲突的文件标记为已解决状态 git add <file> 3.从现有仓库克隆 git c ...
- 胆机实作(1)——12AU7甲类单端前级
第一次做胆机,选了最经典的单端共阴架构.电路没有什么复杂的,基本就是教科书电路,没有用负反馈,因为我不喜欢负反馈的声音.用电路板做机器焊接也没什么难度,器件找好开焊就行,试做机就不打算找外壳了,也不用 ...
- LC 802. Find Eventual Safe States
In a directed graph, we start at some node and every turn, walk along a directed edge of the graph. ...
- Spring + MyBatis 框架下处理数据库异常
一.概述 使用JDBC API时,很多操作都要声明抛出java.sql.SQLException异常,通常情况下是要制定异常处理策略.而Spring的JDBC模块为我们提供了一套异常处理机制,这套异常 ...
- 执行kubelet卡、解决
现象: 执行kubectl get po -o wide 非常卡.慢 原因: 修改node名称造成的, 解决: https://my.oschina.net/u/3390908/blog/164976 ...
- 【笔记】《CNCF × Alibaba云原生技术公开课》知识点
一,课时1:第一堂“云原生”课 二,课时2:容器基本概念 1.已运行 docker run -d -t —name demo ubuntu top 命令, 是否可以在 demo 这个容器内部停止容器? ...