@model IEnumerable<FlexGridData.Sale>

<h1>
    Persisting the Grid State
</h1>
<p>
    This example shows how you can save and restore the grid
    state, including column layout, sort descriptions, and
    filter definitions.
</p>
<p>
    Try reordering, resizing, sorting, and filtering the columns
    on the grid below. Then press the "Save State" button to save the
    state to local storage. Run the sample again and press the
    "Restore State" button to restore the layout that you saved.
</p>
@(Html.C1().FlexGrid().Id("theGrid")
    .Bind(b=>b.Bind(Model).DisableServerRead(true))
    .Filterable(f=>f.Id("theGridFilter"))
)

<button id="btnSave" class="btn btn-default">
    Save State
</button>
<button id="btnRestore" class="btn btn-default">
    Restore State
</button>