序言

花更多的时间去探索未知的东西

 

Options
设计
数据
外观
行为
 
CustomDraw
Customization
DataAsyn
Editor
MasterDetail
Merge
Printing
Property Changed
Sort
Sorting
操作
焦点
鼠标
数据
拖放
外观
行为
 
GridControl
CardGridView
GridView
BandedGridView
AdvBandedGridView
LayoutView
 
在DevExpress中GridControl与GridView有什么区别?
 

动态生成Grid表格

hjpm中涉及到的事件

 

DevExpress控件使用

 

事件

 

GirdControl只是一个容器控件,必须要求GridView视图作为它的子控件,也就是说GirdControl里面必有至少有一个GridView,GridControl可以包含多个视图,可以实现视图的切换

GridView常见的一些属性设置

 

gridView1_CustomDrawCell与gridView1_RowCellStyle都可以且用法一样。但是CustomDrawCell更稳定

private void gridView1_CustomDrawCell(object sender, RowCellStyleEventArgs e)
        {
            DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView;
            //列名=a,值=1的标记为绿色
            if (e.CellValue.ToString() == "1" && e.Column.FieldName.ToString().Equals("a"))
            {
                e.Appearance.BackColor = Color.FromArgb(128, 255, 128);
                e.Column.DisplayFormat.FormatString = "yyyy-MM-dd HH:mm:ss";
               
            }
        }
View Code

相关文章: