I was following same example in MVC explorer.
http://mvc.ext.net/#/GridPanel_Infin...red_Scrolling/
Here's my code:
InfiniteScrolling.vbhtml view
/Home/InfiniteScrolling
@ModelType System.Collections.IEnumerable
@(Html.X().ResourceManager())
@(
ViewBag.Title = "Buffered Scrolling - Ext.NET MVC Examples"
)
<h1>Buffered Scrolling</h1>
<p>Introduced with Ext.Net 2.0, grid supports infinite scrolling, which enables you to load any number of records into a grid without paging.</p>
<p>This grid approach uses a virtualized scrolling system to handle potentially infinite data sets without any impact on client side performance.</p>
<p>This example illustrates loading of all the records up front and buffering the rendered grid.</p>
<script>
var go = function () {
var me = this,
field = me.up('toolbar').down('#gotoLine');
if (field.isValid()) {
me.up('grid').view.bufferedRenderer.scrollTo(field.getValue() - 1, true);
}
};
</script>
@(Html.X().GridPanel() _
.Title("Buffered Grid of 5,000 random records") _
.Width(700) _
.Height(500) _
.Store(Html.X().Store() _
.PageSize(5000) _
.Buffered(True) _
.DataSource(Model) _
.Model(Html.X().Model() _
.Fields( _
New ModelField("id"), _
New ModelField("name"), _
New ModelField("rating", ModelFieldType.Int), _
New ModelField("salary", ModelFieldType.Float) _
) _
) _
).Plugins(Html.X().BufferedRenderer) _
.View(Html.X().GridView().TrackOver(False)) _
.ColumnModel( _
Html.X().RowNumbererColumn().Width(140), _
Html.X().Column().Text("Name").Flex(1).DataIndex("name"), _
Html.X().Column().Text("Rating").Width(125).DataIndex("rating"), _
Html.X().Column() _
.Text("Salary") _
.Width(125) _
.DataIndex("salary") _
.Align(Alignment.Right) _
.Renderer(RendererFormat.UsMoney) _
.Sortable(False) _
) _
.SelectionModel(Html.X().RowSelectionModel().PruneRemoved(False)) _
.BottomBar(Html.X().Toolbar() _
.Items( _
Html.X().NumberField() _
.FieldLabel("Jump to row") _
.MinValue(1) _
.MaxValue(5000) _
.AllowDecimals(False) _
.ItemID("gotoLine"), _
Html.X().Button() _
.Text("Go") _
.Listeners(Sub(ls) ls.Click.Fn = "go" _
) _
) _
))
Home Controller
Imports System.Web.Mvc
Imports System.Linq
Imports ExtNETExamples.ExtNETExamples
Imports Ext.Net.MVC
Imports Ext.Net
Namespace Controllers
Public Class HomeController
Inherits Controller
Function InfiniteScrolling() As ActionResult
Return View(companyModel.GetData())
End Function
End Class
End Namespace
CompanyModel.vb
Imports System.Collections
Imports System.Collections.Generic
Namespace ExtNETExamples
Public Class CompanyModel
Public Shared Function GetData() As IEnumerable
Dim firstNames = New String() {"Russel", "Clark", "Steve", "Sam", "Lance", "Robert", _
"Sean", "David", "Justin", "Nicolas", "Brent"}
Dim lastNames = New String() {"Wood", "Lewis", "Scott", "Parker", "Ross", "Garcia", _
"Bell", "Kelly", "Powell", "Moore", "Cook"}
Dim ratings = New Integer() {1, 2, 3, 4, 5}
Dim salaries = New Integer() {100, 400, 900, 1500, 1000000}
Dim count As Integer = 50000
Dim data = New Object(count - 1) {}
Dim rnd = New Random()
For i As Integer = 0 To count - 1
Dim ratingId = rnd.[Next](ratings.Length)
Dim salaryId = rnd.[Next](salaries.Length)
Dim firstNameId = rnd.[Next](firstNames.Length)
Dim lastNameId = rnd.[Next](lastNames.Length)
Dim rating = ratings(ratingId)
Dim salary = salaries(salaryId)
Dim name = [String].Format("{0} {1}", firstNames(firstNameId), lastNames(lastNameId))
Dim id = "rec-" + i.ToString()
data(i) = New Object() {id, name, rating, salary}
Next
Return data
End Function
End Class
End Namespace
Not sure why it is not working for me.