Home arrow JavaScript arrow Page 2 - EXT JS Working With Live Data
JAVASCRIPT

EXT JS Working With Live Data


In a recent article we looked at the Date-Picker control from the world-class EXT-JS JavaScript library. In this article we’re going to be looking at a series of utilities and controls from the library which let you work with live data including the GridPanel, the PagingToolbar and the JsonReader components. These powerful tools can be combined in numerous ways to provide a robust solution to retrieving, formatting and displaying live data.

Author Info:
By: Dan Wellman
Rating: 5 stars5 stars5 stars5 stars5 stars / 3
July 20, 2009
TABLE OF CONTENTS:
  1. · EXT JS Working With Live Data
  2. · Starting the JavaScript
  3. · Defining the DataStore
  4. · Creating the GridPanel

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
EXT JS Working With Live Data - Starting the JavaScript
(Page 2 of 4 )

The majority of our coding will be done with JavaScript. Let’s look at initializing and invoking our GridPanel, which is what will be used to display the data we’re going to pull from our database. The third script tag in our document is currently empty; within it we can start with the following JavaScript:


//set local blank image

Ext.BLANK_IMAGE_URL = 'ext/resources/images/default/s.gif';

 

//define function to be executed when page loaded

Ext.onReady(function() {


//rest of code to go in here…


});


The first thing we do is set the location of a local blank image using the BLANK_IMAGE_URL constant. This file is used throughout the library, so if we don’t use a local version, one will be downloaded from the Ext domain, which could worsen the performance of your application.

Following this we use the onReady() method, which allows us to specify an anonymous function that should be executed as soon as the DOM is in a usable state. The rest of our code can now sit happily within this anonymous function.

The Ext-Js GridPanel component, which is the foundation of this example, is similar in structure to a standard HTML table, although that is where the similarities begin and end. GridPanel displays data in a table-like format of rows and columns, but it is presented in an extremely attractive manner and contains a lot of built-in advanced functionality like row selection, zebra striping, column sorting and remote data.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 6 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials