Devexpress GridControl

1、隐藏“Drag a column header here to group by that column”如下:

选择gridview->属性

选择OptionView->ShowGroupPanel->false

2、关于gridcontrol显示标题(Caption):

     选择gridcontrol——》run designer

新建列 Column

Caption用来显示标题,ColumnEdit  选择显示控件的类型  ,FileName 需要绑定现实的字段(类的属性或者数据库列名)

3、gridControl 分组显示 (例如按照translator分组)

1  gridView3.Columns["translator"].GroupIndex = 0;
2  gridView3.ExpandAllGroups();
3  gridView3.GroupSummary.Add(SummaryItemType.None, "translator", null);

4、gridview 显示行号

1 private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)  
2 {  
3     if (e.Info.IsRowIndicator)  
4     {  
5         e.Info.DisplayText = "Row " + e.RowHandle.ToString();                 
6     }  
7 }  
8 gridView1.IndicatorWidth = 70;  

5、隐藏显示行号的那一列

   RunDesigner->Views->Options->OptionsView->ShowIndicator 即可

posted on 2015-06-26 15:32  夜雨梧桐  阅读(2001)  评论(0编辑  收藏  举报

导航