如何在datagridview标头中禁用突出显示 [英] How to disable highlighting in datagridview headers

查看:57
本文介绍了如何在datagridview标头中禁用突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将数据绑定到datagridview。



它工作正常但我的问题是,当我将鼠标指针放在列标题上时,它会自动突出显示为蓝色。



当鼠标指针放在列标题上时如何禁用自动突出显示



如何摆脱这个问题

I have binded data to datagridview.

It works fine but my problem is that when I place my mouse pointer over column header it automatically get highlighted with blue color.

How to disable that automatic highlighting when mouse pointer is place over the column header

How to get rid of this problem

推荐答案

希望这有助于你...


DataGridView1.DefaultCellStyle.SelectionBackColor = DataGridView1。 DefaultCellStyle.BackColor

DataGridView1.DefaultCellStyle.SelectionForeColor = DataGridView1.DefaultCellStyle.ForeColor
hope this helps u

DataGridView1.DefaultCellStyle.SelectionBackColor = DataGridView1.DefaultCellStyle.BackColor
DataGridView1.DefaultCellStyle.SelectionForeColor = DataGridView1.DefaultCellStyle.ForeColor


尝试将DataGridView.EnableHeadersVisualStyles设置为False。
Try to set DataGridView.EnableHeadersVisualStyles to False.


这篇关于如何在datagridview标头中禁用突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆