@model IEnumerable<FlexGridData.Sale>

<h1>
    @Html.Raw(Resources.C1Mvc.CVSorting_Title)
</h1>

<p>
    @Html.Raw(Resources.C1Mvc.CVSorting_Text1)
</p>
<p>
    @Html.Raw(Resources.C1Mvc.CVSorting_Text2)
</p>

<label>
    <input type="radio" name="sort" value="" checked="true" />
    @Html.Raw(Resources.C1Mvc.CVSorting_Text3)
</label>
<label>
    <input type="radio" name="sort" value="Country" />
    @Html.Raw(Resources.C1Mvc.CVSorting_Text4)
</label>
<label>
    <input type="radio" name="sort" value="Country,Sales" />
    @Html.Raw(Resources.C1Mvc.CVSorting_Text5)
</label>
<label>
    <input type="radio" name="sort" value="Country,Sales,Downloads" />
    @Html.Raw(Resources.C1Mvc.CVSorting_Text6)
</label>

<p>
    @Html.Raw(Resources.C1Mvc.CVSorting_Text7)
</p>
@(Html.C1().FlexGrid().Id("theGrid").Height(250)
    .Bind(b=>b.Bind(Model).DisableServerRead(true))
    .AutoGenerateColumns(false)
    .Columns(cs=>
    {
        cs.Add().Binding("Country").Header("Country");
        cs.Add().Binding("Downloads").Header("Downloads");
        cs.Add().Binding("Sales").Header("Sales");
        cs.Add().Binding("Expenses").Header("Expenses");
    })
    .ShowSort(true)
    .AllowSorting(false) // sorting done by us, not by the grid
    .ShowAlternatingRows(false)
    .HeadersVisibility(C1.Web.Mvc.Grid.HeadersVisibility.Column)
)