How can you tell if an element in a datagrid has the focus?
-
I have a form with a number of user controls each derived from datagrid. I can't figure out how to tell which user control datagrid has the focus! I tried UserControl.Focused, and it returns false even if I select a cell within the datagrid. I tried overriding the UserControl.Focused property, extending the DataGrid.Focused value, and still no luck. I'm relatively new to C#, so it's probably something simple related to derived controls. Help!
-
I have a form with a number of user controls each derived from datagrid. I can't figure out how to tell which user control datagrid has the focus! I tried UserControl.Focused, and it returns false even if I select a cell within the datagrid. I tried overriding the UserControl.Focused property, extending the DataGrid.Focused value, and still no luck. I'm relatively new to C#, so it's probably something simple related to derived controls. Help!
Got it... ContainsFocus indicates whether the control or any of it's children controls has the focus.