<h1>
    Arrays and CollectionViews
</h1>
<p>
    When you set the grid's <b>itemsSource</b> property to a
    regular JavaScript array, it automatically creates an
    internal <b>CollectionView</b> and uses that as a
    data source so that it can provide sorting and editing features
    without forcing you to create a <b>CollectionView</b> yourself.
</p>
<p>
    This internal view is exposed by the grid's
    <b>collectionView</b> property, and you can use it
    in case you need the extra functionality yourself.
</p>
<p>
    For example, the grid below is bound to a regular array,
    and the grid's <b>collectionView</b> property is used
    to show the currently selected item:
</p>
<div id="selectedItem"></div>
@(Html.C1().FlexGrid().Id("theGrid")
    .AllowSorting(false)
    .ShowSort(false)
    .AutoGenerateColumns(false)
    .Columns(cs=>
    {
        cs.Add().Binding("country").Header("Country");
        cs.Add().Binding("sales").Header("Sales").Format("n2");
        cs.Add().Binding("expenses").Header("Expenses").Format("n2");
    })
)