Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Focus on a datagridview and a textbox at the same time in a C# winform

$
0
0
I understand it's not possible to have multiple focus, but I'm wondering if anyone can help me anyways. I have a datagridview that selects the first item on load and then I set the focus on a search text box. It therefore looks like the datagridview is focused since it is selected and so when my boss would like to horizontal or vertical scroll scroll he presses the arrows and nothing happens since the focus is in the text box. I made a fix and put in the key up event handler of the textbox that if you right, left , up or down press it should focus on the datagridview but then you have to press two times for it to start working. Is there any other way?

Debra has a question


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>