I have a working WinForm that handles the search functionality in my customer database. It contains the following controls:
- A textBox where you type your search string (A)
- A "search" button (B)
- A DataGridView (C) that returns the result of the search
- An "OK" button (D) and a "Cancel" button (E)
What I am trying to accieve next is this:
- When A is active the AcceptButton (enter) should be linked to B
- When B or enter is pressed C should become active
- When C is active the AcceptButton should be linked to D
I realise this is a somewhat big question so don't hesitate to answer just one of the bullet marks if you know the answer.
EDIT: I have solved the implementation of requirement 1 and 3 above, but I am still looking for an answer to the second one. To clarify, when the search is initiated (meaning i have pressed enter on the keyboard or the search button with the mouse) I want focus to shift to the first line in the DataGridView.