mahesh waghela

mahesh waghela

  • NA
  • 33
  • 26.4k

Keep Focus On Main Control By Click To Another

May 13 2012 4:44 AM

I have a datagridview and listbox control on winforms . My task is not to lost focus from datagridview on press or click to listbox control.

I want to keep focus on datagridview.

For Example: when datagridview have focus and if I press or click to listbox then the datagridview lost the focus but I just want to keep focusing datagridview on press or click to listbox. Any help will appreciated.

I have tried datagridview.focus() on click event of listbox but it's lost the focus from datagridview columns1 and gain the focus to datagridview columns2. In short the said event and calling method is lost the focus from datagridview. I just want to keep focusing datagridview columns1 on click tolistbox. Is it possible?.



Answers (2)