Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将onClick操作添加到具有三角形并且是默认添加的列的左列。我发现了如何使用它来隐藏它,"RowHeadersVisible=false"但我不想隐藏它我只是希望该onClick列的 执行相同的操作,就像您单击同一行中的不同列一样。
onClick
"RowHeadersVisible=false"
我明白了,这是行动
private void datagrid1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { if(e.ColumnIndex == -1) { } }