I finally got the records to scroll in my xamDataGrid by removing a style, i am not sure why the style affects the scroll behavior though. I have included it below in case anyone can see a problem with it.
My next question is how to get the scrolling smooth. It takes several seconds from the time i click the scroll until the records change. I have all virtualization turned off hoping that would help, but it didn't make a difference. My xaml for the grid is also below:
<!-- GRID -->
<igDP:XamDataGrid Name="grid" Theme="ForestGreen" AutoFit="True" SelectedItemsChanged="grid_SelectedItemsChanged" >
<igDP:XamDataGrid.FieldSettings >
<igDP:FieldSettings CellClickAction="SelectRecord" AllowEdit="False" AllowSummaries="True" AllowGroupBy="True" AllowCellVirtualization="False" LabelTextWrapping="WrapWithOverflow" SummaryDisplayArea="BottomFixed" />
</igDP:XamDataGrid.FieldSettings>
<igDP:XamDataGrid.Resources>
<Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="ScheduleImageCellStyle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">
<Grid Width="70" Height="70" Margin="2">
<Border BorderBrush="#DDDDDD" BorderThickness="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<Image Width="32" MaxHeight="64" MaxWidth="64" Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}" />
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</igDP:XamDataGrid.Resources>
<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings AutoGenerateFields="False" />
</igDP:XamDataGrid.FieldLayoutSettings>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout>
<igDP:FieldLayout.FieldSettings>
<igDP:FieldSettings AllowEdit="False" CellClickAction="SelectRecord" />
</igDP:FieldLayout.FieldSettings>
<igDP:FieldLayout.Fields>
<igDP:Field Name="ImageFile" Label="Budget Status">
<igDP:Field.Settings>
<igDP:FieldSettings CellHeight="64" CellWidth="64"
CellValuePresenterStyle="{StaticResource ScheduleImageCellStyle}"
CellMaxWidth="100" LabelMaxWidth="100"/>
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="WorkOrder" Label="Work Order">
<igDP:FieldSettings CellHeight="25" AllowGroupBy="True"/>
<igDP:Field Name="WOOperation" Label="Operation">
<igDP:FieldSettings CellHeight="25" AllowGroupBy="True" >
</igDP:FieldSettings>
<igDP:Field Name="WOSubOperation" Label="Sub-Operation">
<igDP:Field Name="Location" Label="Location" >
<igDP:Field Name="Description" Label="Description">
<igDP:FieldSettings CellHeight="200" AllowGroupBy="True" >
<igDP:FieldSettings.EditorStyle>
<Style TargetType="{x:Type igEditors:XamTextEditor}">
<Setter Property="TextWrapping" Value="Wrap" />
</igDP:FieldSettings.EditorStyle>
<igDP:Field Name="ProjectedCost" Label="Projected Cost">
<igDP:FieldSettings CellHeight="25" AllowGroupBy="True" AllowSummaries="True" >
<Style TargetType="{x:Type igEditors:XamCurrencyEditor}"/>
<igDP:Field Name="ProjectedHours" Label="Projected Hours">
<igDP:FieldSettings CellHeight="25" AllowGroupBy="True" AllowSummaries="True">
<Style TargetType="{x:Type igEditors:XamTextEditor}"/>
<igDP:Field Name="ProjectedBilling" Label="Projected Billing">
<!-- -->
<igDP:Field Name="ActualCost" Label="Actual Cost">
<igDP:Field Name="ActualHours" Label="Actual Hours">
<igDP:FieldSettings CellHeight="25" AllowGroupBy="True">
<igDP:Field Name="ActualBilling" Label="Actual Billing">
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>
<!--- ScrollViewer Style that messes up scroll behaviour -->
<Style TargetType="ScrollViewer">
<Setter Property="HorizontalContentAlignment"
Value="Left" />
<Setter Property="VerticalContentAlignment"
Value="Top" />
<Setter Property="Padding"
Value="4" />
<Setter Property="BorderThickness"
Value="1" />
<Setter Property="BorderBrush"
Value="{StaticResource NormalBorderBrush}" />
<ControlTemplate TargetType="ScrollViewer">
<Border BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="2">
<Grid Background="{TemplateBinding Background}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ScrollContentPresenter Cursor="{TemplateBinding Cursor}"
Margin="{TemplateBinding Padding}"
x:Name="ScrollContentPresenter"
ContentTemplate="{TemplateBinding ContentTemplate}" />
<Rectangle Grid.Column="1"
Grid.Row="1"
Fill="#FFE9EEF4" />
<ScrollBar IsTabStop="False"
x:Name="PART_VerticalScrollBar"
Width="18"
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
Grid.Column="1"
Grid.Row="0"
Orientation="Vertical"
ViewportSize="{TemplateBinding ViewportHeight}"
Maximum="{TemplateBinding ScrollableHeight}"
Minimum="0"
Value="{TemplateBinding VerticalOffset}"/>
Height="18"
x:Name="PART_HorizontalScrollBar"
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
Grid.Column="0"
Orientation="Horizontal"
ViewportSize="{TemplateBinding ViewportWidth}"
Maximum="{TemplateBinding ScrollableWidth}"
Value="{TemplateBinding HorizontalOffset}"/>
Hello,
The record virtualization is turned on/off through the RecordContainerGenerationMode property of the XamDataGrid, but I do think that this is the reason. How big is your data source? How many records do you have in it? Have you changed the RecordContainerGenerationMode proeprty? Do you have heavy performance code in events that are fired frequently - like RecordsInViewChanged, InitializeRecord, etc?
I have about 14K rows in the grid when this occurs, It is a List of objects returned from a Web Service. The only event tied to the grid right now is SelectedItemsChanged, and that doesn't appear to get called when the scrolling is occuring. I have not changed RecordContainerGenerationMode at all, Now that i am looking at it, it is set to Recycle, which i think is default right? I will try the other settings (Virtualized, LazyLoad, Preload) and let you know if that helps.