存档

文章标签 ‘grid’

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

2009年8月25日 marshall 没有评论

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, 技术 标签: ,

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