Click here to Skip to main content
15,879,037 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all


in mousehover event

datagridview1.focus();

how can I unfocus the mouseleave event?
Posted
Updated 25-Oct-12 23:48pm
v2

By setting the focus to a different element.
 
Share this answer
 
Comments
U@007 26-Oct-12 5:47am    
I tried but not working.
in gridview's mouse enter event
C#
datagridview1.focus();

in gridview's mouse leave event
C#
textbox1.focus();

Happy Coding!
:)
 
Share this answer
 
Comments
U@007 26-Oct-12 7:28am    
I tried in starting it'self but not working
Aarti Meswania 26-Oct-12 7:30am    
put break-point & debug, check grid's mouse enter & mouse leave events are firing or not?
I think what you need is clear selection, is it?
C#
dataGridView1.ClearSelection();
 
Share this answer
 
use

this.dgvacc_InvChild.CellLeave
this.dgvacc_InvChild.CellEnter
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900