@model IEnumerable<FlexGridData.Sale>

<h1>
    Aggregates Above the Data
</h1>
<p>
    To show aggregates above the data, follow these steps:
</p>
<ol>
    <li>
        Set the <b>aggregate</b> property on the columns that you want to aggregate.
    </li>
    <li>
        Create a single <b>GroupDescription</b> based on a dummy property.
    </li>
    <li>
        Optionally, freeze the top row to keep the aggregates in view.
    </li>
</ol>
@(Html.C1().FlexGrid<FlexGridData.Sale>().Id("theGrid").Height(250)
    .AutoGenerateColumns(false)
    .Bind(Model)
    .Columns(cs=>
    {
        cs.Add().Binding("Id").Header("ID").Width("60").IsReadOnly(true);
        cs.Add().Binding("Country").Header("Country");
        cs.Add().Binding("Product").Header("Product");
        cs.Add().Binding("Sales").Header("Sales");
        cs.Add().Binding("Expenses").Header("Expenses");
    })
)