private void dataGridView(DataGridView dataGridView)
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
dataGridView.AllowUserToAddRows = false;
dataGridView.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.LightCyan;
dataGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridView.BackgroundColor = System.Drawing.Color.White;
dataGridView.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
dataGridView.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;//211, 223, 240
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)()))), ((int)(((byte)()))), ((int)(((byte)()))));
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)()));
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Navy;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.EnableHeadersVisualStyles = false;
dataGridView.GridColor = System.Drawing.SystemColors.GradientInactiveCaption;
dataGridView.ReadOnly = true;
dataGridView.RowHeadersVisible = false;
dataGridView.RowTemplate.Height = ;
dataGridView.RowTemplate.ReadOnly = true;
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
}

C#DataGridView 美化的更多相关文章

  1. C# winform 界面美化技巧(扁平化设计)

    关于C#界面美化的一些小技巧 在不使用第三方控件如 IrisSkin 的前提下,依然可以对winform做出让人眼前一亮的美化 首先,我们先来实现主界面的扁平化 此处分为两个步骤,第一步是更改winf ...

  2. Winform 美化

    首先,我们先来实现主界面的扁平化 此处分为两个步骤,第一步是更改winform自带的MainForm窗体属性,第二步是添加窗体事件. 将主窗体FormBorderStyle更改为None,这样就得到了 ...

  3. 使用 SailingEase WinForm 框架构建复合式应用程序(插件式应用程序)

    对于一些较小的项目,具备一定经验的开发人员应该能够设计和构建出便于进行维护和扩展的应用程序.但是,随着功能模块数量(以及开发维护这些部件的人员)的不断增加,对项目实施控制的难度开始呈指数级增长. Sa ...

  4. C#温度报警

    using System; using System.Collections.Generic; using System.Text; using System.Collections; using S ...

  5. DataGridView单元格美化

          #region 重绘Column.Row           int _RowHeadWidth = 41;         ///            /// 重绘Column.Row ...

  6. C# DataGridView自定义分页控件

    好些日子不仔细写C#代码了,现在主要是Java项目,C#.Net相关项目不多了,有点手生了,以下代码不足之处望各位提出建议和批评. 近日闲来无事想研究一下自定义控件,虽然之前也看过,那也仅限于皮毛,粗 ...

  7. C# WinForm界面美化--使用IrisSkin实现换肤功能

    WinForm界面使用IrisSkin,可以说做到了一键美化,当然美化的效果仁者见仁智者见智,可以挑选自己喜欢的. 1.IrisSkin下载地址:https://www.cr173.com/soft/ ...

  8. (八十九)c#Winform自定义控件-自定义滚动条(treeview、panel、datagridview、listbox、listview、textbox)

    官网 http://www.hzhcontrols.com/ 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kw ...

  9. Linux 桌面美化那点事儿

    各个 Linux 桌面发行版刚拿到手的时候,或多或少都有点儿不满意,对它们进行一些改造是必须的.网上不乏各种 Linux 桌面美化的教程和经验贴,对我们这些 Linux 爱好者来说都是很好的参考资料. ...

随机推荐

  1. Controltemplate datatemplate

    DataTemplate ControlTemplate we can search many posts about this topic. some valuable link: DataTemp ...

  2. Timer Design in StatusBar

    Timer in StatusBar we need to show local time in StatusBar. solution: 1. add textblock control 2. bi ...

  3. Webservice初接触

    公司用到了Powerbuilder+Webserice的技术,能将数据窗口中对数据库的请求,以SQL语句的形式,发到Webservice中,然后由Webservice完成对数据库的请求,并将结果返回给 ...

  4. Android L Camera2 API 使用实例程序汇总

    在网上发现几个使用Camera API2开发的实例程序,总结一下方便后续参考: 1.Camera2 Basic : https://github.com/googlesamples/android-C ...

  5. apache-activemq-5.14.0学习总结

    一.什么是ActiveMQ? 百度百科对ActiveMQ的描述:

  6. 设计模式 -- 单例模式(Java&&PHP)

    所谓单例模式,简单来说,就是在整个应用中保证只有一个类的实例存在.就像是Java Web中的application,也就是提供了一个全局变量,用处相当广泛,比如保存全局数据,实现全局性的操作等. 能够 ...

  7. [转载]ubuntu下如何更改mysql数据存放路径

    http://www.gaojinbo.com/ubuntu%E4%B8%8B%E5%A6%82%E4%BD%95%E6%9B%B4%E6%94%B9mysql%E6%95%B0%E6%8D%AE%E ...

  8. 命令学习:iftop

    iftop显示带宽使用情况 http://riobard.com/2010/04/30/l2tp-over-ipsec-ubuntu/ http://jaseywang.me/2011/12/19/i ...

  9. android开发 wifi开发工具类

    import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.Iterator; import j ...

  10. throttle/debounce: 为你的cpu减减压(前端性能优化)

    何为throttle, 何为debounce? 谷歌翻译给出的意思:throttle 掐死???   debounce 去抖 好吧,按理解我们习惯翻译成 ——节流. 那么在什么场景下需要用到? 场景一 ...