I have a very large database and need to dynamtically load them as I paged through (possibly with filter). I am hoping to use Syncfusion GRID virutal scrolling and paging but it does not seem to work for me. Can you provide some examples? Thanks.
[Controller]
public ActionResult Index()
{
var features = db.Features.Include(d => d.FeatureClass);
return View(features.ToList());
}
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(PagingParams args)
{
var features = db.Features.Include(d => d.FeatureClass);
return features.GridActions<Feature>();
}
[Index.chtml]
@{Html.Syncfusion().Grid<gThiraMetrix.Models.DavaFeature>("FlatGrid")
.Datasource(Model)
.EnablePaging()
.EnableSorting()
.Scrolling(scroll => { scroll.AllowVirtualScrolling(true); })
.Column(column =>
{
column.Add(c => c.FeatureID).HeaderText("Feature ID");
column.Add(c => c.FeatureName).HeaderText("Feature Name");
column.Add(c => c.FeatureClass.FeatureClass).HeaderText("Feature Class");
column.Add(c => c.StateAlpha).HeaderText("State");
column.Add(c => c.CountyName).HeaderText("County");
column.Add(c => c.Country).HeaderText("Country");
}).Render();
}