Is there a property to set to make the XamDataGrid not focus on the whole grid when being tabbed to, and instead focus first on the first cell of the first row?
The fact that you are setting a CellPresenterStyle should be not be relevant. If you programatically set the ActiveCell property to the first cell in the first record then when the grid gets focus it will shift focus into the CellValuePresenter associated with that cell. If you would like to see a feature where the grid does this automatically you may submit a suggestion for that here. For now, you would have to set the ActiveCell or possibly handle the GotKeyboardFocus event (make sure you only process it though if the e.OriginalSource == sender since this is a bubble event) and shift focus from there possibly even using the grid's ExecuteCommand with its DataPresenterCommands.CellFirstOverall.
The issue is that I'm using a CellPresenterStyle, so the cell does not activate when it gets focus, which I handle myself, so what I'm looking for, it to programatically Activate the cell which would correspond to .CellFirstOverall
If the grid has an ActiveRecord or an ActiveCell then it does actually focus the record or cell when it gets the keyboard focus. It must be in your case that you have neither an ActiveCell nor ActiveRecord. You could programatically set the ActiveRecord or ActiveCell so that there is an object for the grid to shift focus into.
What I had meant was that if a user was using keyboard exclusively and tabbed to the XamGrid, the entire grid gets focus with a ---- line around it. Then susequent tabs focus on rows then navigate rows. I wanted the initial focus to go instead to the first enterable cell, instead of the focus on the outer grid. This command is what I needed. Thanks.
Hello,
I am not sure I understand the whole question, but you want to focus the first cell of the first record when you tab from another element to the XamDataGrid. I suppose you can handle the GotFocus event and use DataPresenterCommands to go to the first cell
xamDataGrid.ExecuteCommand(DataPresenterCommands.CellFirstOverall
Hope this helps,
Alex.