FlexGrid
FlexGrid
Virtual Scrolling
This sample shows how to make grid work in virtual scrolling mode.
Features
ID
Start
End
Country
Product
Color
Amount
Amount2
Discount
Active
Url
Img
Rank
ID
Start
End
Country
Product
Color
Amount
Amount2
Discount
Active
Url
Img
Rank
1
1/25/2025
1/25/2025
German
Gadget
Green
581.61
1,030.17
0.14
https://en.wikipedia.org/wiki/Tourism_in_German
https://cdn.grapecity.com/wijmo/images/1.png
4
2
2/25/2025
2/25/2025
Italy
Gadget
Green
-4,673.75
3,499.71
0.13
https://en.wikipedia.org/wiki/Tourism_in_Italy
https://cdn.grapecity.com/wijmo/images/2.png
2
0
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 | using MvcExplorer.Models; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace MvcExplorer.Controllers { public partial class FlexGridController : Controller { // // GET: /VirtualScrolling/ public ActionResult VirtualScrolling() { return View(Sale.GetData(100000)); } } } |
1 2 3 4 5 6 7 8 9 10 11 | @model IEnumerable< Sale > @ (Html.C1().FlexGrid< Sale >() .Bind(bl => bl.InitialItemsCount(100).Bind(Model)) .IsReadOnly( true ) .CssClass( "grid" ) ) @section Description{ @Html .Raw(Resources.FlexGrid.VirtualScrolling_Text0) } |