0
我試圖在我的datagridview上顯示一個自定義的contextmenustrip,除了當單元格正在被編輯時它工作正常。然後它顯示默認窗口contextmenustrip與複製/剪切/ ...vb.net DataGridview在正在編輯的單元格上顯示自定義的ContextMenuStrip
有沒有辦法來覆蓋DataGridViewTextBoxCell contextmenustrip或禁用它?
從Disable DataGridView System ContextMenu的解決方案does not工作給我。
Private Sub DataGridView1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DocCostGroupDetsDataGridView.MouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
_CustomContextMenuStrip.fGetContextMenu()
_CustomContextMenuStrip.Show(DataGridView1, e.Location)
End If
End Sub