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 属性来指定显 ...
随机推荐
- 单调队列优化dp(捡垃圾的机器人)
/************************************************************************* > File Name: a.cpp > ...
- flutter常用内置动画组件
文章目录 AnimatedContainer AnimatedCrossFade Hero AnimatedBuilder DecoratedBoxTransition FadeTransition ...
- sentinel备忘
git https://github.com/alibaba/Sentinel https://github.com/dubbo/dubbo-sentinel-supportdubbo http: ...
- JVM 内存溢出(转载~)
对于JVM的内存写过的文章已经有点多了,而且有点烂了,不过说那么多大多数在解决OOM的情况,于此,本文就只阐述这个内容,携带一些分析和理解和部分扩展内容,也就是JVM宕机中的一些问题,OK,下面说下O ...
- Jmeter设置字体大小
Jmeter5.0原配置字体很小,需要更改其配置 在apache-jmeter-5.0/bin/下的jmeter.properties文件中添加如下内容: jmeter.hidpi.mode=true ...
- umask 介绍
umask码 是用户创建文件或目录的初始权限设置值 文件或目录的权限:读: r — 4写: w — 2执行: x — 1 输入umask 查看umask 码 设定umask码,umask 0033 1 ...
- Python新利器之pipenv
前言 之前学习异步asyncio库的时候,因为asyncio库支持Python3.5以上的版本,而我的Ubuntu14.04只有Python3.4,虽然下载了Python3.6,但是想直接利用ipyt ...
- Linux新增开放端口
CentOS系统 开放端口的方法: 方法一:命令行方式 1. 开放端口命令: /sbin/iptables -I INPUT -p tcp --dport 8080 -j ...
- 一起学习linux环境的git
第一节 GIT最初是由Linus Benedict Torvalds为了更有效地管理Linux内核开发而创立的分布式版本控制软件,与常用的版本控制工具如CVS.Subversion不同,它不必服务器端 ...
- Spring框架是一种非侵入式的轻量级框架
摘自<Spring框架技术> Spring框架是一种非侵入式的轻量级框架 1.非侵入式的技术体现 允许在应用系统中自由选择和组装Spring框架的各个功能模块,并且不强制要求应用系统的类必 ...