using Microsoft.AspNetCore.Mvc;
using WebApiExplorer.Models;
namespace WebApiExplorer.Controllers.Wijmo5FlexGrid
{
public partial class Wijmo5FlexGridController : Controller
{
private readonly GridExportImportOptions _flexGridPagingModel = new GridExportImportOptions
{
NeedExport = true,
NeedImport = false,
IncludeColumnHeaders = true,
OnlyCurrentPage = false
};
public IActionResult Paging()
{
ViewBag.Options = _flexGridPagingModel;
return View();
}
}
}
@{
GridExportImportOptions optionsModel = ViewBag.Options;
ViewBag.DemoSettings = true;
}
<div id="@(optionsModel.ControlId)" style="height:300px"></div>
@section Settings {
@await Html.PartialAsync("_FlexGridOptions", optionsModel)
}
<script>
var grid = new wijmo.grid.FlexGrid('#@(optionsModel.ControlId)');
initializeFlexGrid(grid);
grid.collectionView.pageSize = 10;
</script>
<c1-pager owner="@optionsModel.ControlId"></c1-pager>
@section Description{
@Html.Raw(Wijmo5FlexGrid.Paging_Text0)
}