@model IEnumerable<FlexGridData.Sale>

<h1>
    C1 MVC Services
</h1>

<p>
    Service is an object defined to provide additional functionality. 
    Currently, ASP.NET MVC Edition provides following two services:
</p>
<ol>
    <li>
        <code>c1.mvc.collections.RemoteCollectionView</code>
    </li>
    <li>
        <code>c1.mvc.olap.PivotEngine</code>
    </li>
</ol>
<p>
    The service object can be obtained using <code>c1.getService(serviceId)</code>.
</p>
<p>
    The sample shows how to create a RemoteCollectionView service and customize it.
</p>
@Html.C1().CollectionViewService().Id("sCV").Bind(Model).DisableServerRead(true).PageSize(10)
@(Html.C1().FlexGrid().ItemsSourceId("sCV").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");
    })
)
<input type="button" value="Previous Page" name="Previous" onclick="movePage(this)" />
<input type="button" value="Next Page" name="Next" onclick="movePage(this)" />