Code to select a field after a button is clicked?

Currently the “WRITE” button writes the data in the grid to a csv, then it nulls the job num field to the left. I want to not only null it but then also select it for the next entry.
I’m not sure the terminology…select, highlight, target, activate, whatever.

I want them during the process to not have to click the write button and then go back and click on the field to enter another job. I want it to pop right back to targeting the Job field. I understand how to use the code and where to put it, just not sure how to write it.

.Focus() should do the trick.

EpiTextBox focusTxtBox;
focusTxtBox = (EpiTextBox)csm.GetNativeControlReference(“your-reference-Epi-GUID”);
focusTxtBox.Focus();

3 Likes

Ugh. Focus. That makes so much sense. Googling wasn’t helping because I couldn’t find the right word.
That worked great. Thanks so much!

1 Like