First, try to use the CODE tags when posting code. Otherwise it's unreadable without some effort. The first error I get in Firebug is dojo.addOnLoad(init);
This is pretty easy because you have no function named "init". Change it to:dojo.addOnLoad(initialize);
Next, I see "grid is not defined" at this line:dojo.connect(grid, "onRowClick", onRowClickHandler);
It looks like you have no "grid" variable declared.Start with that.