![taw 4 more than 16 chapters on screen taw 4 more than 16 chapters on screen](https://i.ytimg.com/vi/JM27aT9qhZc/maxresdefault.jpg)
Here is the settings which I used for second DataGridView: (ControlStyles.Selectable, false) Īnd here is the extension method which I used to expose SetStyle: public static class Extensions Then you can use it against all controls. Training Air Wing Four augment units (SAU. They are Training Squadrons Twenty-Seven (VT-27), Twenty-Eight (VT-28), Thirty-One (VT-31), and Thirty-Five (VT-35). Since it's a useful method, you can create an extension method like what I used here to simulate an on-screen keyboard. Training Air Wing Four (TRAWING 4), one of five training air wings under the Chief of Naval Air Training Command, was established in March 1972. Since SetStyle is prottected, you can not use it outside of your control. To make in non-selectable, you can derive from DataGridView and in constructor, make in non-selectable: SetStyle(ControlStyles.Selectable, false) Do not use prior year funds to fund travel in the new fiscal year. If more than one LOA is required, allocate the expenses accordingly. To make it read only, it's enough to set its ReadOnly property to true. Access the Accounting screen and select the LOA(s) for the new fiscal year (Figure 2-1). Then when user double click on its cells, it doesn't steal focus from the focused control. You can make your DataGridView non-selectable and also make it read-only. Int selEndPos = selStartPos + editBox.SelectionLength ĮditBox.Text = (0, selStartPos) + () + (selEndPos) ĮditBox.SelectionStart = selStartPos + ().Length Int selStartPos = editBox.SelectionStart TextBox editBox = (TextBox)dgvDest.EditingControl Target inserting the variable in the current selected edited area inside the textbox If (cell.IsInEditMode & = typeof(DataGridViewTextBo圎ditingControl)) If (e.Button != MouseButtons.Right) return ĭataGridView dgvSrc = (DataGridView)sender ĭataGridViewCell cellSrc = įoreach (DataGridViewCell cell in dgvDest.SelectedCells) Ideas? Edit: Example of dgv2 CellMouseDoubleClick event private void dgv2_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) The only thing I could come up with is to try and find a way to disable the left mouse click event but I was hoping to basicly just make it "not respond" like it does when you double RIGHT click on the cell/row. I want to see if it's possible to be able to do exactly what I'm doing by double right clicking on dgv2 with the left mouse click button? Currently I have to use the right mouse double click event on dgv2 because if at any time I left click or left double click the focus will move from dgv1 to dgv2 and stop editing the dgv1 cell I'm working on. For example, I might be editing a cell (text) in dgv1 and need to double click on a row in dgv2 to put the contents into dgv1 (similar to a quick copy/paste). I have one (dgv1) that I edit the data in and one (dgv2) that is used for viewing only (catching click actions).