@model IEnumerable<FlexGridData.Sale>

<h1>
    Scrolling and ViewRange
</h1>
<p>
    When user selects a cell using mouse or keyboard,
    FlexGrid automatically ensures that it is visible by
    calling the <b>scrollIntoView</b> method.
</p>
<p>
    The <b>scrollIntoView</b> method causes the grid to
    scroll so that the requested cell is within the
    current <b>viewRange</b>. The grid will scroll the
    minimum amount needed to show the cell, so it may
    become visible at the top, middle, or bottom of the
    view range.
</p>
<p>
    If you want to show a specific row at the top of the view
    range, you need a slightly different approach. Get the
    bounding rectangle of the cell you want to show to the
    top and use the coordinates to set the grid's
    <b>scrollPosition</b> property.
</p>
<p>
    For example:
</p>
<button id="scrollIntoView" class="btn btn-default">
    Scroll Row 100 Into View
</button>
<button id="scrollToTop" class="btn btn-default">
    Set Top Cell to Row 100
</button>
@Html.C1().FlexGrid().Id("theGrid").Bind(Model).Height(200)