datagrid [Enter event]

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

Hi,
This is driving me totally insane. I have two datagrid controls, and
when I click on the first one its Enter event is called properly but
the Enter event of the other one is being called straight after. I
don't understand why...
Here is my code if someone wants to have a look at that:

Private Sub dgCtrl_Enter(ByVal sender As Object, ByVal e As
System.EventArgs) Handles dgCtrl.Enter
m_dgCtrlFocused = True
m_dgFieldsFocused = False
m_dgParamsFocused = False
End Sub

Private Sub dgFields_Enter(ByVal sender As Object, ByVal e As
System.EventArgs) Handles dgFields.Enter
m_dgCtrlFocused = False
m_dgFieldsFocused = True
m_dgParamsFocused = False
End Sub


thx
 
I think I should be more precise as it is not exactely what I've
described.

I have 3 datagrids. one is in the form, the two others are in two
different tabs of a tab control.

When the second tab is selected, my first grid can get the focus OK.
But it's when the first tab is selected that my first grid can't get
any focus (or it got it but then the Enter event of the grid in the
first tab is called).
Am I clear enough ?
 
hum... I've deleted my first tab and created it again, and that has
solved the problem. Don't know why though.
thx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top