//序号列宽度
gridView1.IndicatorWidth = 60;
//行不可编辑
gridView1.OptionsBehavior.Editable = false;
//复选框多选
gridView1.OptionsSelection.MultiSelect = true;
gridView1.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect;
gridView1.DataSourceChanged += new System.EventHandler(gridView1_DataSourceChanged);
//字体、居中
gridView1.Appearance.HeaderPanel.Font = new Font("Tahoma", 26F);
gridView1.Appearance.Row.Font = new Font("Tahoma", 26F);
gridView1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
gridView1.Appearance.Row.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
//取消默认选中行
//最左边状态列
gridView1.OptionsView.ShowIndicator = false;
//禁用聚焦单元格矩形
gridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.None;
gridView1.OptionsSelection.EnableAppearanceFocusedCell = false;
gridView1.OptionsSelection.EnableAppearanceFocusedRow = false;
gridView1.OptionsSelection.EnableAppearanceHideSelection = false;
//隔行变色
gridView1.Appearance.EvenRow.BackColor = Color.FromArgb(150, 237, 243, 254);
gridView1.Appearance.OddRow.BackColor = Color.FromArgb(150, 199, 237, 204);
gridView1.OptionsView.EnableAppearanceEvenRow = true;
gridView1.OptionsView.EnableAppearanceOddRow = true;
devexpress gridview样式设置
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
上一篇:cv函数
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
DevExpress GridView 整理(转)sed taro 数据 可编辑 控件