nextwebgen.com

The Next Generation Web Now

Dojo Grid Widget Updated. Data Integration and Editing Improvements.

Filed under: Web 2.0 News — Rey Bango at 8:00 am on Wednesday, July 16, 2008

Dojo developers will be pleased to read about the recent update to the Dojo grid control. Version 1.2 of the grid control focuses primarily on improving integration with Dojo data stores, improved grid layout handling and providing advanced in-place editing capabilities. The update was fairly extensive forcing the team to rethink the design of the widget and refactor quite a bit of code. As such, the updated version of the grid has been setup as a new control allowing developers to continue to use the older version while being able to take advantage the updated features. This will ensure that applications based on the previous grid control won’t break.

The biggest benefit truly is the tighter coupling between the new DataGrid and Dojo’s existing dojo.data stores:

In order to use dojo.data stores with the grid in previous releases, you needed the dojox.grid.data.DojoData model which would bridge the gap between the grid and the store. DataGrid has been engineered to remove that bridge. Instead of using stand-alone models to store data for the grid, any dojo.data store that implements the Dojo Data read API can be used. Additionally, DataGrid can use the write and notification API’s if they are available.

For example, the following code will create a new dojo.data store based off of a JSON file from a URL and populate the new DataGrid by passing it as an option to the DataGrid constructor:

JAVASCRIPT:

  1.  
  2. var jsonStore = new dojo.data.ItemFileReadStore({ url: “json/gaskets.json” });
  3.  
  4. var grid = new dojox.grid.DataGrid({
  5.         id: ‘grid’,
  6.         query: { part_num: ‘*’ },
  7.         store: jsonStore,
  8.         structure: layout
  9. }, ‘gridNode’);
  10.  

rb_dojo_data.png

Building a solid grid control isn’t an easy task and it seems like the Dojo team have done a great job of enhancing their widget.

Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blogmarks
  • del.icio.us
  • De.lirio.us
  • digg
  • NewsVine
  • YahooMyWeb

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>