GridControl
隐藏Drag a column header here to group by that column
https://www.devexpress.com/Support/Center/Question/Details/Q412390
I have created a Grid Control to view the Currency table. As there are only ten records in the table, can I hide the "Drag a column header here to group by that column" bar for the Grid Control.
To achieve this goal disable the GridView.OptionsView.ShowGroupPaneloption.
添加或者删除行
https://documentation.devexpress.com/#WindowsForms/CustomDocument752
https://www.devexpress.com/Support/Center/Question/Details/T195251
Please accept my apologies for providing the incorrect information.
The grid can't operate without a data source.
However, you're able to create an empty DataTable (without rows) that has only columns.
Look at the following code:
DataTable dt = new DataTable();
dt.Columns.Add("ID", typeof(int));
dt.Columns.Add("Name", typeof(string));
gridControl1.DataSource = dt;
需要注意的是,手动添加了GridColumn的话,需要指定FiledName属性,要和DataTable中的列名保持一致。
设置时间格式,
https://www.devexpress.com/Support/Center/Question/Details/Q360794
To accomplish this task, set the GridColumn.DisplayFormat.FormatType property to the FormatType.DateTime value
禁止编辑
gridView1.OptionsBehavior.Editable = false;
某一列的单元格显示图片
设置GridColumn的ColumnEdit为PictureEdit,设置UnboundType为Object

private DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit repositoryItemPictureEdit1;
设置repositoryItemPictureEdit1的图片显示

某一个单元格的单击事件
https://www.devexpress.com/Support/Center/Question/Details/Q406257
To accomplish this task, use the GridView.RowCellClickevent.
Please note that this event will not fire when clicking on a row cell, if data editing is enabled and the ColumnViewOptionsBehavior.EditorShowMode property is set to MouseDown (and to Default, if multiple row selection is disabled). To accomplish this task, set the GridView.OptionsBehavior.EditorShowMode property to the EditorShowMode.MouseUp value.
private void gridView1_RowCellClick(object sender, RowCellClickEventArgs e)
{
if (e.Column == gridColumn3)
{
//需要弹出对应行的场景配置详情
Console.WriteLine($@"第{e.RowHandle + 1},第{e.Column.ColumnHandle}列");
}
}
GridControl的更多相关文章
- DevExpress学习系列(控件篇):GridControl的基本应用
一般属性设置 不显示分组框:Gridview->Option View->Show Group Panel=false 单元格不可编辑:gridcontrol -->gridview ...
- Devexpress GridControl.Export
private void mnuExportTable_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { u ...
- DevExpress GridControl 选择整行被选单元格不变色的设置
设置GridControl 里面的 gridview 属性, 找到OptionSelection 将EnableAppearanceFocusedCell 属性设置False 就可以了 此方式同样适用 ...
- DevExpress控件的GridControl控件小结
DevExpress控件的GridControl控件小结 (由于开始使用DevExpress控件了,所以要点滴的记录一下) 1.DevExpress控件组中的GridControl控件不能使横向滚动条 ...
- DevExpress GridControl使用方法
一.如何解决单击记录整行选中的问题 View->OptionsBehavior->EditorShowMode 设置为:Click 二.如何新增一条记录 (1).gridView.AddN ...
- DevExpress的GridControl的实时加载数据解决方案(取代分页)
http://blog.csdn.net/educast/article/details/4769457 evExpress是一套第三方控件 其中有类似DataGridView的控件 今天把针对Dev ...
- dev GridControl实现拖拽
一.示例说明 以gridControl1和gridControl2为例,从gridControl1拖拽行到gridControl2中去. 二.属性设置 gridControl2.AllowDrop = ...
- DEV GridControl小结
1. 如何解决单击记录整行选中的问题 View->OptionsBehavior->EditorShowMode 设置为:Click 2. 如何新增一条记录 (1).gridView.Ad ...
- DEVExpress GridControl|TableView |FormatConditions 按一定格式设置相应内容
Get到一个新技能,感觉好棒.摘自DEV官网:https://www.devexpress.com/Support/Center/Example/Details/T135593 <Window ...
- 在gridControl的单元格中的多行文本
我们知道,gridcontrol里面的单元格默认是不能换行的,但是有时候我们需要显示要换行的文本,应该怎么处理呢?这里提供一个方案: 假设我有一个列”合同文本“(colContractText),我要 ...
随机推荐
- 网站部署后Parser Error Message: Could not load type 的解决方案
asp.net 的Webproject 项目是在64bit机上开发,默认选项发布后,部署到32bit的服务器上,出现Parser Error Message: Could not load type的 ...
- php课程---简单的分页练习
在写代码时,我们可以用类来使代码更加方便简洁,下面是一个简单的查询分页练习 源代码: <html> <head> <style type="text/css&q ...
- 【iCore3 双核心板_FPGA】例程七:基础逻辑门实验——逻辑门使用
实验指导书及代码包下载: http://pan.baidu.com/s/1Rs18U iCore3 购买链接: https://item.taobao.com/item.htm?id=52422943 ...
- Object对象类
Object对象类是所有类的祖先,他是默认自动继承的 Java为什么要做一个对象类呢?对象类的目的就是归一了类型,他就是把所有的类所有的对象归纳成为 Object类型.因为对象他认为对象应该拥有一些什 ...
- 新广告法,极限词剔除,替换掉的mysql语句
国家级,世界级,最高级, 最佳,最大,第一, 唯一,首个,首选, 最好,最大,精确, 顶级,最高,最低, 最,最具,最便宜, 最新,最先进,最大程度, 最新技术,最先进科学,国家级产品, 填补国内空白 ...
- 使用 Grafana、collectd 和 InfluxDB 打造现代监控系统
想打造 New Relic 那样漂亮的实时监控系统我们只需要 InfluxDB/collectd/Grafana 这三个工具,这三个工具的关系是这样的: 采集数据(collectd)-> 存储数 ...
- js获取url中参数
/** * 获取地址栏参数值 * @param name 参数名 * @returns */ $(function () { var url = location.search; //获取url中 ...
- OpenERP/Odoo命令行参数
http://blog.sina.com.cn/s/blog_7cb52fa80102v8h1.html
- 跳转至指定ViewController
有些情况下,并不是简单的push pop,需要连跳几个VC,可以用下面的方法: for(UIViewController * vc in self.navigationController.child ...
- inittab 分析
内核初始化后,启动init进程/sbin/init,读取/etc/inittab文件进行初始化. 参考链接 http://wenku.baidu.com/view/5a82b5f67c1cfad619 ...