WinForms - DataGridView - 没有选择单元格 [英] WinForms - DataGridView - no cell selected
问题描述
DataGridView.CurrentCell属性可用于清除焦点矩形。
您可以将此属性
(DataGridView.CurrentCell)设置为null到
临时删除焦点
矩形,但是当控件
收到焦点,此
属性的值为null,它将自动
设置为
FirstDisplayedCell属性的值。
http:/ /msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.currentcell.aspx
Is there a way to make a DataGridView have no cell selected? I notice even when it loses focus() it has a at least one active cell. Is there another mode that allows this? or some other trick?
DataGridView.CurrentCell property can be used to clear the focus rectangle.
You can set this property (DataGridView.CurrentCell) to null to temporarily remove the focus rectangle, but when the control receives focus and the value of this property is null, it is automatically set to the value of the FirstDisplayedCell property.
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.currentcell.aspx
这篇关于WinForms - DataGridView - 没有选择单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!