【问题标题】:How to highlight or change the color of a DataGridview row如何突出显示或更改 DataGridview 行的颜色
【发布时间】:2012-02-04 02:21:35
【问题描述】:

我有数据库表

    Inbox(id,accountid,emailfrom,emailsubject,emailbody, recieveddate,attachment, read(bool)

我已通过表格适配器将其添加到表单中,并在网格视图中显示它。工作正常。但我想做的一件事是当读取的列值为假时,我想更改网格行的颜色或突出显示该行?

请指导我怎么做?

【问题讨论】:

    标签: c# winforms datagridview


    【解决方案1】:

    此链接How do I specially color only the current cell of a readonly datagrid 是否回答了您的问题?我讨论了如何创建自定义列样式,覆盖其绘制方法以更改背景颜色。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-02-02
      • 2010-12-12
      • 2012-03-27
      • 2012-10-24
      • 2012-12-17
      • 1970-01-01
      • 1970-01-01
      • 2017-03-24
      相关资源
      最近更新 更多