using WebApiExplorer.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace WebApiExplorer.Controllers
{
public partial class MVCFlexGridController : Controller
{
private readonly GridExportImportOptions _flexGridVirtualScrollingModel = new GridExportImportOptions
{
NeedExport = true,
NeedImport = false,
IncludeColumnHeaders = true
};
public ActionResult VirtualScrolling()
{
ViewBag.Options = _flexGridVirtualScrollingModel;
return View(Sale.GetData(1000));
}
}
}
@using WebApiExplorer.Models
@model IEnumerable<Sale>
@{
GridExportImportOptions optionsModel = ViewBag.Options;
ViewBag.DemoSettings = true;
}
@(Html.C1().FlexGrid<Sale>().Id(optionsModel.ControlId)
.Bind(bl => bl.InitialItemsCount(100).Bind(Model))
.IsReadOnly(true)
.CssClass("grid")
)
@section Settings{
@Html.Partial("_FlexGridOptions", optionsModel)
}
@section Description{
<p>@Html.Raw(Resources.MVCFlexGrid.VirtualScrolling_Text0)</p>
}