I have a DataGrid which usually contains approx 30 rows it rarely goes above 200. My problem is when the user goes through the contents of the grid with the up/down arrow keys it keeps getting stuck(approx 10 to 40 seconds) and then jumping several rows at a time
My DataGrid
<DataGrid Name="DgInvoiceLines" KeyUp="DgInvoiceLines_KeyUp" BorderBrush="Black"
RowBackground="Silver" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible"
AutoGenerateColumns="False" SelectionUnit="FullRow" SelectionMode="Extended" CanUserAddRows="True" CanUserDeleteRows="True"
HorizontalContentAlignment="Center" CellEditEnding="DgInvoiceLines_CellEditEnding" VerticalContentAlignment="Center"
PreviewKeyDown="DgInvoiceLines_PreviewKeyDown" SelectionChanged="DgInvoiceLines_SelectionChanged"
CurrentCellChanged="DgInvoiceLines_CurrentCellChanged" ItemsSource="{Binding}" BorderThickness="0,2,0,0"
EnableColumnVirtualization="False" EnableRowVirtualization="False" ScrollViewer.CanContentScroll="False">
<DataGrid.Columns>
<DataGridTextColumn Width="Auto" Header="ProductCode" Binding="{Binding ProductCode}"/>
<DataGridTextColumn Width="250" Header="Description" Binding="{Binding Description}" FontSize="14"/>
<DataGridTextColumn Width="61" Header="Inv_Quantity" Binding="{Binding Inv_Quantity}"/>
<DataGridTextColumn Width="63" Header="Grn_Quantity" Binding="{Binding Grn_Quantity}"/>
<DataGridTextColumn Width="59" Header="Inv_Price" Binding="{Binding Inv_Price}"/>
<DataGridTextColumn Width="61" Header="Ord_Price" Binding="{Binding Grn_Price}"/>
<DataGridTextColumn Width="72" Header="Inv_Total" Binding="{Binding Inv_Total}"/>
<DataGridTextColumn Width="74" Header="Grn_Total" Binding="{Binding Grn_Total}"/>
<DataGridTextColumn Width="58" Header="AnalCode" Binding="{Binding AnalCode}"/>
<DataGridTextColumn Width="60" Header="Vat_Rate" Binding="{Binding Vat_Rate}"/>
<DataGridTextColumn Width="60" Header="Vat" Binding="{Binding Vat}" IsReadOnly="True"/>
<DataGridTextColumn Width="Auto" Header="GrnNo" Binding="{Binding GrnNo}"/>
<DataGridCheckBoxColumn Width="Auto" Binding="{Binding Line_Correct}" Header="" >
<DataGridCheckBoxColumn.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
<EventSetter Event="PreviewMouseLeftButtonDown" Handler="DataGridCell_PreviewMouseLeftButtonDown"/>
</Style>
</DataGridCheckBoxColumn.CellStyle>
</DataGridCheckBoxColumn>
<DataGridTextColumn Width="Auto" Header="Comment" Binding="{Binding Comment}"/>
<DataGridTextColumn Width="Auto" Header="PerP" Binding="{Binding OuterUnits}" IsReadOnly="True"/>
</DataGrid.Columns>
<DataGrid.CellStyle >
<Style TargetType="{x:Type DataGridCell}">
<Style.Triggers>
<Trigger Property="IsKeyboardFocused" Value="True" >
<Setter Property="Background" Value="White" />
<Setter Property="Foreground" Value="Black" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Foreground" Value="Black"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>
<DataGrid.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="LightSteelBlue"/>
</DataGrid.Resources>
</DataGrid>
It's not using Entity Framework, and the data is on a very busy virtual server.
Can anyone point to somewhere to look for a solution or indicate any problems in my XAML?
EDIT
I'm starting to think that I'm just trying to get the grid to do too much!