DataGridViewHeaderCell.MouseDownUnsharesRow 方法

定義

指出當指標位於某資料列的儲存格上,並按住滑鼠按鈕時,是否會取消共用該資料列。

protected:
 override bool MouseDownUnsharesRow(System::Windows::Forms::DataGridViewCellMouseEventArgs ^ e);
protected override bool MouseDownUnsharesRow (System.Windows.Forms.DataGridViewCellMouseEventArgs e);
override this.MouseDownUnsharesRow : System.Windows.Forms.DataGridViewCellMouseEventArgs -> bool
Protected Overrides Function MouseDownUnsharesRow (e As DataGridViewCellMouseEventArgs) As Boolean

參數

e
DataGridViewCellMouseEventArgs

DataGridViewCellMouseEventArgs,包含滑鼠位置的相關資訊。

傳回

true 如果使用者按鍵按鍵,則會啟用視覺化樣式、 EnableHeadersVisualStyles 屬性為 true,而且 DataGridView 屬性不是 null,否則 false為 。

備註

如需啟用可視化樣式的相關信息,請參閱 Application.EnableVisualStyles 方法。

MouseDownUnsharesRow 在之前 OnMouseDown呼叫 。 如果的呼叫OnMouseDown具有取消共享資料列 rowIndex的效果,它必須傳回 true 。 否則應該會傳回 false

如需數據列共用的詳細資訊,請參閱調整 Windows Forms DataGridView 控件的最佳做法

適用於

另請參閱