加入两个组件:BindingNavigator和BindingSource代码:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.D ...
分类:
其他好文 时间:
2017-07-08 10:05:48
阅读次数:
1802
private void grvDetail_MasterRowExpanded(object sender, DevExpress.XtraGrid.Views.Grid.CustomMasterRowEventArgs e) { DevExpress.XtraGrid.Views.Grid.Gr ...
分类:
其他好文 时间:
2017-06-15 17:17:54
阅读次数:
278
在DevExpress中GridControl中纵向合并单元格只需要设置this.gridView1.OptionsView.AllowCellMerge = true;列默认是可合并的,若设置某列不可合并可设置该列为this.gridColumn1.OptionsColumn.AllowMerge ...
分类:
其他好文 时间:
2017-06-15 17:17:45
阅读次数:
254
背景 需要在gridview中增加一列。之前的数据都是通过Datatable 绑定到GridControl.DataSource呈现。(GridControl 不能只通过非绑定列呈现) Note that the Grid Control cannot operate with only unbou ...
Dev控件GridControl设置了一个右键菜单 this.gridControl1.ContextMenu = contextMenu2; 而GridControl在运行排序的时候,即 gridview1->OptionsCustomization->AllowSort设为true时,控件自带一 ...
分类:
其他好文 时间:
2017-06-08 13:06:04
阅读次数:
335
关于DevExpress.XtraGrid的复合表头或多行表头的示例,界面如下图所示 1.首先要把DevExpress的GridControl转换为BandedGridView 2.设置显示列及绑定的字段 此处设置与我们平常使用GridControl制件一样 3.进入设计视图(见下图),点击Band ...
分类:
其他好文 时间:
2017-06-08 12:02:41
阅读次数:
224
1、 如何解决单击记录整行选中的问题 View->OptionsBehavior->EditorShowMode 设置为:Click 2、 如何新增一条记录 (1)、gridView.AddNewRow() (2)、实现 gridView_InitNewRow 事件 3、如何解决 GridContr... ...
分类:
其他好文 时间:
2017-06-08 12:01:36
阅读次数:
199
滚轮翻页与传动的翻页更为方便,经过本人一番探讨与琢磨终于在XtraGrid的GridView中实现了鼠标滚轮翻页。 我新建了一个组件继承原本的GridControl,在组件中添加了一个ImageList,专门存放一些资源图片。用于实现动态图的效果。 添加一个自定义委托的参数与枚举,委托参数用于传递分 ...
分类:
其他好文 时间:
2017-05-31 14:24:56
阅读次数:
231
(1)、gridView.AddNewRow() (2)、实现 gridView_InitNewRow 事件 注:使用泛型集合绑定数据源,在GridView中实现自动添加行时,AddNewRow()方法不起效。在获取数据行时,GetDataRow()方法无法获取数据,如果使用gridcontrol用 ...
分类:
其他好文 时间:
2017-05-19 20:17:16
阅读次数:
176
private void grvDetail_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e) { if (grvDetail.RowCount > 0 && e.R ...
分类:
其他好文 时间:
2017-05-05 14:22:42
阅读次数:
190