<UserControl x:Class="DataViewDashboard.Views.SalesOrderHeadersGrid"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d">
    <Grid>
        <TextBlock Text="No orders found for this customer."/>
        <c1:C1DataGrid ItemsSource="{Binding SalesOrderHeaders}" AutoGenerateColumns="False" CanUserGroup="False" Visibility="{Binding SalesOrderHeaders, Converter={StaticResource hasOrdersVisibilityConverter}}">
            <c1:C1DataGrid.Columns>
                <c1:DataGridTextColumn Header="Account Number" Binding="{Binding AccountNumber}" SortMemberPath="AccountNumber" FilterMemberPath="AccountNumber" />
                <c1:DataGridTextColumn Header="Sales Order Number" Binding="{Binding SalesOrderNumber}" SortMemberPath="SalesOrderNumber" FilterMemberPath="SalesOrderNumber" />
                <c1:DataGridTextColumn Header="Purchase Order Number" Binding="{Binding PurchaseOrderNumber}" SortMemberPath="PurchaseOrderNumber" FilterMemberPath="PurchaseOrderNumber" />
                <c1:DataGridTextColumn Header="Status" Binding="{Binding Status}" SortMemberPath="Status" FilterMemberPath="Status" />
                <c1:DataGridCheckBoxColumn Header="Online Order" Binding="{Binding OnlineOrderFlag}" SortMemberPath="OnlineOrderFlag" FilterMemberPath="OnlineOrderFlag" />
                <c1:DataGridNumericColumn Header="Subtotal" Binding="{Binding SubTotal}" SortMemberPath="SubTotal" FilterMemberPath="SubTotal" Format="c2"/>
                <c1:DataGridNumericColumn Header="Tax Amount" Binding="{Binding TaxAmt}" SortMemberPath="TaxAmt" FilterMemberPath="TaxAmt" Format="c2"/>
                <c1:DataGridNumericColumn Header="Freight" Binding="{Binding Freight}" SortMemberPath="Freight" FilterMemberPath="Freight" />
                <c1:DataGridNumericColumn Header="Total Due" Binding="{Binding TotalDue}" SortMemberPath="TotalDue" FilterMemberPath="TotalDue" Format="c2"/>
                <c1:DataGridDateTimeColumn Header="Order Date" Binding="{Binding OrderDate}" SortMemberPath="OrderDate" FilterMemberPath="OrderDate" DateFormat="Short" EditMode="Date" />
                <c1:DataGridDateTimeColumn Header="Due Date" Binding="{Binding DueDate}" SortMemberPath="DueDate" FilterMemberPath="DueDate" DateFormat="Short" EditMode="Date"/>
                <c1:DataGridDateTimeColumn Header="Ship Date" Binding="{Binding ShipDate}" SortMemberPath="ShipDate" FilterMemberPath="ShipDate" DateFormat="Short" EditMode="Date"/>
                <c1:DataGridTextColumn Header="Comment" Binding="{Binding Comment}" SortMemberPath="Comment" FilterMemberPath="Comment" />
            </c1:C1DataGrid.Columns>
        </c1:C1DataGrid>
    </Grid>
</UserControl>
