Dojo dstore with dgrid – Don’t Forget Trackable

dstore-dojo-logoMy dstore-based dgrid gave me an issue last week when it was not updating when adding items to the collection.

Dgrid Add Items – Not Trackable

Click “run” above …. hm, that didn’t work.

If you do a search, you’ll see on the dgrid 0.4 blog post that:

dstore 1.0 introduces a new Trackable mixin that is the evolution of Observable. dstore/Trackable allows dgrid to stay in sync with all store updates much more easily.

Which means, basically, that you must add the Trackable mixin to your dstore if you want your dgrid to be updated when you add items:


I hope this helps you out!

Display MailChimp Subscriber Numbers on WordPress

If you have a ton of MailChimp subscribers, and want to tell the world (and build more subscribers in the process), the MailChimp Subscriber Chiclet Plugin is for you.


  • Four colors
  • Easy-to-use WordPress Shortcode interface
  • Configurable link to MailChimp signup page
  • Configurable text

A pro version is coming with a few more features than the free version.

Download the free version from now: MailChimp Subscriber Chiclet for WordPress

ArcGIS JavaScript Draggable InfoWindow

The InfoWindow on a web map is the primary method of of showing information on selected items in the map. The map control automatically does its best to show the InfoWindow within the the viewport of the map, but on some maps and in certain situations, it may be appropriate to allow the user to drag the InfoWindow away from the automatically placed location. This is can be done easily with the dojo/dnd/Moveable module.

dojo/dnd/Moveable simply takes a DOM Node reference. To make the InfoWindow of the map draggable, pass map.infoWindow.domNode to the Moveable constructor. For a great user experience, pass the title bar as the “handle” and remove the indicator triangle pointer once user has dragged the InfoWindow:

In what situations have you used a draggable InfoWindow Popup? Let me know in the comments.

Dojo dgrid Filter

TomandJerryTitleCardcdgrid and dstore, the Tom and Jerry of the Dojo world are wonderful for creating dynamic, data-driven tables. If you haven’t heard of them, check ’em out.

Creating a simple textbox that live-filters your dgrid is not super-obvious though. Here’s how.

First you must understand how dstore and dgrid work together. Here’s a summary:

dstore provides a common API for accessing and manipulating data. It is intended to replace dojo/store and the older dojo/data API. Starting with 0.4 dgrid interfaces directly with dstore stores. Previous releases of dgrid worked with dojo/store instances, and the older dojox/grid works with the older dojo/data API.

~ dgrid: Using Grids and Stores

In other words, to filter the dgrid, just filter the dstore that drives it.

First, create your dstore and dgrid. Then wire up your TextBox to call a function on every keypress:

Then write your function. Here you want to go through all the grid columns, creating a Filter on each one, and apply them to the dstore. Finally, set the dstore’s filter to the new Filter you created:

Here it is in action (code).