1.获取行号
//获得选中的行,如果是单选模式,则直接选取第一个
int SelectedLineNo = gridView1.GetSelectedRows()[0];
2.指定行和列属性获取单元格数据
//指定行和列属性名取单元格数据
string name = gridView1.GetRowCellValue(SelectedLineNo,"Name").ToString();
3.隐藏GridControl的GroupPanel表头
Run Designer -> Views -> OptionsView -> ShowGroupPanel = False
4.单击记录整行选中的问题
Run Designer -> Views -> OptionsBehavior -> EditorShowMode = Click
5.GridContorl记录能获取不显示的问题
gridView1.populateColumns() //会将所有的绑定数据都显示出来
6.只能选择不能编辑(或者编辑某一单元格)
1.Run Designer -> Views -> OptionsBehavior-> EditorShowMode = Click
2.Run Designer -> Views -> OptionsBehavior-> Editable = false
7.禁用GridContorl中单击列弹出右键菜单
Run Designer -> OptionsMenu -> EnableColumnMenu = false
8.禁用列头的过滤器
Run Designer -> OptionsCustomization -> AllowFilter = false
9.如何不显示横向滚动条
Run Designer -> Views ->OptionsView -> ColumnAutoWidth = false
10.表格表头居中显示
Run Designer -> Views ->Appearance -> HeaderPanel -> TextOptions -> HAlignment = Center
11.列内容居中显示
Run Designer -> Columns -> 列 -> AppearanceCell -> TextOptions -> HAlignment = Center

© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END








暂无评论内容