samideqlqpart 发表于 2019-5-16 14:31:29

Datagridview问题

你好
,我得到了两个数据网格
视图,问题是第一个数据网格视图代码。
当我用鼠标点击标题时,没有任何反应。
但是在第二个中,消息出现了
如何解决这个问题?
公共分部类 Form1 : Form
{
public Form1()
{
InitializeComponent();
       }
private void dataGridView1_ColumnHeaderMouseClick(
object sender, DataGridViewCellMouseEventArgs e)
{
MessageBox.Show(“hello”);
       }
private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
MessageBox.Show(“hello”);
       }
}
}
**** Hidden Message *****

kdub 发表于 2019-5-16 19:26:10


我无法重现此问题。
我假设了一个Windows桌面.NET Framework Form。VS2019 Net 4.7.2
什么是你的
DataGridView.SelectionMode属性
的控件(inBehaviour)
也许你可以构建并发布一个最小解决方案的zip来演示你的问题。
如果这是 AutoCAD 插件,则同上。
埃格尔斯,

samideqlqpart 发表于 2019-5-17 04:12:17


,是的,我正在使用NET Framework VS2019 Net 4.7.2
我有NET Framework VS2013 Net 4.5,一切都很好
如何治愈它?
DataGridViewCellPaintingEventArgs现在也不起作用。
谢谢

samideqlqpart 发表于 2019-5-17 11:11:29


事实上net Framework 4.7.2是个问题!!!!
框架4.5一切都很完美。
现在我可以用框架4.7.2做什么?
是否有任何遗漏的引用?
页: [1]
查看完整版本: Datagridview问题