I have had a problem that I have finally found a solution.
My users require the ability for the focus to be moved to the first column of the next data row when the press enter on the insertion row. They are happy to use the arrow keys to move around the grid and the tab key whilst in edit mode but when they pressed the Enter key the were very unhappy the focus remained on the column that had the focus when the pressed the Enter key. This meant they would have to either left mouse click into the first column or move there by use of arrow keys etc... I like to keep my users happy so here is my attempt at moving the focus to first column after the Enter key has been pressed.
Please note; this currently only works when a user inserts a new row but that is by design.
Xaml
<xcdg:DataGridControl Name="TestGrid"
PreviewKeyUp="TestGrid_PreviewKeyUp"
xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid">
<xcdg:DataGridControl.View>
<xcdg:TableView UseDefaultHeadersFooters="False">
<xcdg:TableView.Footers>
<DataTemplate>
<xcdg:InsertionRow />
</DataTemplate>
</xcdg:TableView.Footers>
<xcdg:TableView.FixedHeaders>
<DataTemplate>
<xcdg:HierarchicalGroupByControl xcdg:TableView.CanScrollHorizontally="False" />
</DataTemplate>
<DataTemplate>
<xcdg:ColumnManagerRow />
</DataTemplate>
</xcdg:TableView.FixedHeaders>
</xcdg:TableView>
</xcdg:DataGridControl.View>
</xcdg:DataGridControl>
VB Code
Private Sub TestGrid_PreviewKeyUp(ByVal sender As System.Object, ByVal e As System.Windows.Input.KeyEventArgs)
If e.Key = Key.Enter Then
Dim grid As DataGridControl = sender
Dim c As Column = grid.CurrentColumn
Dim row As Integer = grid.SelectedIndex
If c IsNot Nothing And c.HasValidationError = False And row = -1 Then
Dim pos As Integer = grid.VisibleColumns.IndexOf(c)
If pos = 0 Or pos = grid.Columns.Count - 1 Then
c = grid.Columns(0)
grid.CurrentColumn = c
grid.BringItemIntoView(c)
grid.BeginEdit()
e.Handled = True
Else
e.Handled = False
End If
Else
e.Handled = False
End If
End If
End Sub
If will post changes to move the focus to the first column of the next row when the user presses the Enter key on an existing row, as soon as I figure out how to do that.