How do I change the datagridview selected row background color?

后端 未结 6 688
无人共我
无人共我 2020-12-03 13:06

How do I change the datagridview selected row background color in C# windows applications?

6条回答
  •  悲&欢浪女
    2020-12-03 13:58

    On the DataGridView there is a DefaultCellStyle, inside this there is SelectionBackColor and SelectionForeColor properties.

    The DataGridView uses a style inheritance idea, in case you find that the style you pick is not being applied:

    http://msdn.microsoft.com/en-us/library/1yef90x0.aspx

提交回复
热议问题