FlexGrid
FlexGrid
Virtual Scrolling
This sample shows how to make grid work in virtual scrolling mode.
Features
0
loading...
Description
This sample shows how to make grid work in virtual scrolling mode. To enable this functionality, the DisableServerRead property should be false(default). Then the InitialItemsCount property should be set a number which is greater than 0.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | using MvcExplorer.Models; using Microsoft.AspNetCore.Mvc; using C1.Web.Mvc; using C1.Web.Mvc.Serialization; namespace MvcExplorer.Controllers { public partial class FlexGridController : Controller { // // GET: /VirtualScrolling/ public ActionResult VirtualScrolling() { return View(); } public ActionResult VirtualScrolling_Bind([C1JsonRequest] CollectionViewRequest<Sale> requestData) { return this .C1Json(CollectionViewHelper.Read(requestData, Sale.GetData(100000))); } } } |
1 2 3 4 5 6 7 | < c1-flex-grid is-read-only = "true" class = "grid" > < c1-items-source initial-items-count = "100" read-action-url = "@Url.Action(" VirtualScrolling_Bind ")" ></ c1-items-source > </ c1-flex-grid > @section Description{ @Html .Raw(FlexGridRes.VirtualScrolling_Text0) } |