Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
Scrolling xamDataGrid
posted

I have a readonly xamDataGrid that I want to use to display some rows. Rows are exceeding the height of the grid control but no scroll bars are visible. If I resize the window and make it larger, I can see all the records, but when it the window is smaller, some rows are clipped.

Here's my xaml code:

<vw:ReportView x:Class="Jimba.UI.View.SalesReport"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:igdp="http://infragistics.com/DataPresenter"
    xmlns:fa="http://schemas.hightech.ir/wpf/2008/FarsiLibrary"
    xmlns:con="clr-namespace:Jimba.UI.Converter"
    xmlns:vw="clr-namespace:Jimba.Infrastructure.View;assembly=Jimba.Infrastructure">

    <UserControl.Resources>
        <con:DateTimeConverter x:Key="DefaultDateConverter" />
    </UserControl.Resources>

    <StackPanel Orientation="Vertical">
        <Expander Header="{LocText Key=ReportFilter}" VerticalAlignment="Top" Margin="10" IsExpanded="True">
            <StackPanel Margin="10">
                <StackPanel Orientation="Horizontal" Margin="2">
                    <TextBlock Text="{LocText Key=DateFrom, Suffix=':'}" Width="80" VerticalAlignment="Center" FontFamily="{DynamicResource MessageFontFamily}" />
                    <fa:FXDatePicker SelectedDateTime="{Binding ReportDateFrom}" ShowEmptyButton="False" MaxDate="2999/01/01" MinDate="2000/01/01" />
                </StackPanel>

                <StackPanel Orientation="Horizontal" Margin="2">
                    <TextBlock Text="{LocText Key=DateTo, Suffix=':'}" Width="80" VerticalAlignment="Center" FontFamily="{DynamicResource MessageFontFamily}" />
                    <fa:FXDatePicker SelectedDateTime="{Binding ReportDateTo}" ShowEmptyButton="False" MaxDate="1/1/2999" MinDate="1/1/2000" />
                </StackPanel>
            </StackPanel>
        </Expander>   
       
        <igdp:XamDataGrid x:Name="PurchaseList" FontFamily="Tahoma"
                          AutoFit="True" GroupByAreaLocation="None" ScrollingMode="Deferred"
                          DataSource="{Binding TransactionsData}" Margin="5">

            <igdp:XamDataGrid.FieldLayouts>
                <igdp:FieldLayout>
                    <igdp:FieldLayout.Settings>
                        <igdp:FieldLayoutSettings AutoGenerateFields="False"
                                                  AllowAddNew="False" AllowDelete="False" />
                    </igdp:FieldLayout.Settings>
                    <igdp:FieldLayout.Fields>
                        <igdp:Field Name="PurchaseDate" Label="{LocText Key=DateAndTime}" Converter="{StaticResource DefaultDateConverter}" ConverterParameter="g">
                            <igdp:Field.Settings>
                                <igdp:FieldSettings AllowEdit="False" AllowSummaries="True"  />
                            </igdp:Field.Settings>
                        </igdp:Field>
                        <igdp:Field Name="Product" Label="{LocText Key=Product}">
                            <igdp:Field.Settings>
                                <igdp:FieldSettings AllowEdit="False" AllowSummaries="True" />
                            </igdp:Field.Settings>
                        </igdp:Field>
                        <igdp:Field Name="Quantity" Label="{LocText Key=Quantity}">
                            <igdp:Field.Settings>
                                <igdp:FieldSettings AllowEdit="False" AllowSummaries="True" />
                            </igdp:Field.Settings>
                        </igdp:Field>
                        <igdp:Field Name="PaidValue" Label="{LocText Key=Total}">
                            <igdp:Field.Settings>
                                <igdp:FieldSettings AllowEdit="False" AllowSummaries="True" />
                            </igdp:Field.Settings>
                        </igdp:Field>
                        <igdp:Field Name="Purchaser" Label="{LocText Key=Customer}">
                            <igdp:Field.Settings>
                                <igdp:FieldSettings AllowEdit="False" AllowSummaries="True" />
                            </igdp:Field.Settings>
                        </igdp:Field>
                    </igdp:FieldLayout.Fields>
                </igdp:FieldLayout>
            </igdp:XamDataGrid.FieldLayouts>

        </igdp:XamDataGrid>
    </StackPanel>

</vw:ReportView>