Login Register

TypeError

Dojox Grid problem this._arrayOfTopLevelItems has no properties

Hi to all, I'm pretty new to Dojo and I'm experiencing some problems with grids. I need to show data caught from a DB which sends them in JSON format. It's an array containing a number in the first position, and arrays again in the other positions; client side I just group the arrays in bigger ones through some criteria. Each group represents a data store for a single grid.
My problem is that grids show only question marks, instead of data. Through FireBug I had the following error description:

"this._arrayOfTopLevelItems has no properties"
"TypeError"

Callback onComplete not working for Csv when no item data

I am creating a CSV Store in my code and doing a fetch. However, sometimes the URL only returns the header of CSV. In this scenario I see an exception in the firebug console, but the exception doesn't bubble up to my java script.

Ideally, I would like to capture the error and destroy the grid when I don't get any data. Currently the Grid displays with header and one row(all the cells in the row have '?').

Syndicate content