Focus problem

  • Thread starter Thread starter Michael Wong
  • Start date Start date
M

Michael Wong

On the form, I have a textbox in which users provide information to filter a
datagrid.
The problem I have is when I move around (horizontally and vertically) in
the datagrid,
the textbox seems to receive focus and repaints itself before focusing back
to the datagrid.

The only workaround I found is to have Tabstop = False for the textbox, but
then I cannot have
it initially focused when the form displays for the first time.

I tried setting the focus to the textbox in the form constructor and in the
form load event but
both doesn't work: Focus() returned false.

What have I done wrong?
 
Back
Top