Requires the Frame to return the value to the form in the DataGrid from the main form, and the Frame is hidden and the focus is positioned to other controls of the main form ..,
Solution: Add a timer, enabled = false
After passing the value, make it available, then in the Timer_Timer event, transfer the focus to the past ....