What Is ExtJS ExtJS 4+ Extensions Examples Tutorials

13Dec/110

ASP.NET AJAX & ExtJS 4 Grid (2)

In this example series we'll keep using MSAjaxProxy we set up earlier, for working with IIS 6+ running MS AJAX Extensions 1.0

In this example we'll set up an ExtJS4 gridpanel with infinite scrolling, using XML data served from ASP.NET. Sometimes this is also called "buffered grid." Sencha provides an example using memory store, but it took me some time to figure this one out, so enjoy!



Please refer to the previous example for our store model & proxy setup.

var tab = Ext.create('Ext.grid.Panel', {
	xtype: 'grid'
	, columns: [
		{ header: 'ID', dataIndex: 'id' }
		, { header: 'Name', dataIndex: 'name' }
	]
	, store: Ext.create('Ext.data.Store',{
		model: ...
		, proxy: ...
		, listeners: {
			// After the store is loaded
			'prefetch': function(store, records, isSuccess, operation) {
				alert('Loaded');
			}
		} // eo listeners
		// Infinite scrolling
		, pageSize: 50
		, buffered: true
		, purgePageCount: 0
	}) // eo store
	// Infinite scrolling
	, verticalScroller: { xtype: 'paginggridscroller', activePrefetch: false }
	, invalidateScrollerOnRefresh: false
	, viewConfig: { trackOver: false }
});
 
// Load ALL remote data, but display only so much
tab.store.guaranteeRange(0,49);
VN:F [1.9.22_1171]
Rating: 6.4/10 (5 votes cast)
ASP.NET AJAX & ExtJS 4 Grid (2), 6.4 out of 10 based on 5 ratings
Comments (0) Trackbacks (1)

Leave a comment

* Copy This Password *

* Type Or Paste Password Here *