If you for example bind the Data Grid to a collection of a hundred (100) objects, only the ones that are currently visible on the screen and a few more will actually be present in the visual tree.
Focus() method on a particular The Data Grid control has a Selection Unit property that decides whether rows, cells or both can be selected.
object for the data item has been virtualized away.
The Data Grid control in WPF 4.5 by default uses user interface virtualization for performance reasons.
Setting any of these properties in code does in fact select the row and give it some kind of focus but the behaviour is slightly different compared to when clicking on it.
For example, the row doesn’t get highlighted the same way and if you try to use the arrow keys of the keyboard to navigate between the rows after you have set any of the mentioned properties in code the row will lose its focus.
You can view these properties and methods in corresponding categories (Private, Public, RTTI, Debug Agent, Firefox, and so on).