首页 > Web, 技术 > Why does dojo grid need a name column in the json data source

Why does dojo grid need a name column in the json data source

I debug the problem for nearly half of this afternoon.  Here’s the description something who encountered the same problem wrote on stackoverflow:

http://stackoverflow.com/questions/811596/why-does-dojo-grid-need-a-name-column-in-the-json-data-source/

In brief, if a json data source without a ‘name’ column is provided to a dojo grid, the grid won’t show the content but a row full with question marks.

So I dig into the source code and found that the grid would perform a query with ‘{name : ‘*’}’ by default. So the most simple workaround is to add an query attribute to the <table> element, making it:

<table query=”{ID:’*'}” …>

BTW, the code lies in ‘dojox/grid/compat/_data/model.js’

分类: Web, 技术 标签: ,
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word


Warning: fsockopen() has been disabled for security reasons in /home/onlymars/public_html/wp/wp-includes/class-snoopy.php on line 1142