InertiaM
Well-known member
Could someone please check this for me?
New project, add a DataGridView to a form.
Add a ContextMenuStrip, and add the following :-
Insert
Move
(separator)
Delete
Under "Insert", add the following children
One row
Two rows
Under "Delete", add the following children
Delete row
Delete ALL rows
With "Insert", set the Enabled property to False
Link the ContextMenuStrip to the DGV.
Run the project, and right click on the DGV. You cant click on Insert as it's disabled. If you quickly go down and hover over Delete (so that it's children are NOT shown) and then go back to Insert, the children are still not shown.
However, if you hover over Delete so the children are shown, and then go back to Insert, the children are shown - and will run events if clicked on
Any suggestions (other than to loop through all the children and set them to disabled )
New project, add a DataGridView to a form.
Add a ContextMenuStrip, and add the following :-
Insert
Move
(separator)
Delete
Under "Insert", add the following children
One row
Two rows
Under "Delete", add the following children
Delete row
Delete ALL rows
With "Insert", set the Enabled property to False
Link the ContextMenuStrip to the DGV.
Run the project, and right click on the DGV. You cant click on Insert as it's disabled. If you quickly go down and hover over Delete (so that it's children are NOT shown) and then go back to Insert, the children are still not shown.
However, if you hover over Delete so the children are shown, and then go back to Insert, the children are shown - and will run events if clicked on
Any suggestions (other than to loop through all the children and set them to disabled )