Why does dojo grid need a name column in the json data source
2009年8月25日
没有评论
I debug the problem for nearly half of this afternoon. Here’s the description something who encountered the same problem wrote on stackoverflow:
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’
最近评论