Combobox Dojo组合框未填充数据

Combobox Dojo组合框未填充数据,combobox,dojo,datagridcomboboxcolumn,Combobox,Dojo,Datagridcomboboxcolumn,我不知道我做错了什么,但我已经按照阿帕罗克解释的方法做了。我想,我也在将对象添加到store对象中。但同样的情况并没有反映在用户界面上。下拉列表仍然为空。我能帮忙吗 我的选择框代码: <div class="ecmSearchFormInputArea"> <table class="ecmSearchFormInputArea"> <tr> <td class="prope

我不知道我做错了什么,但我已经按照阿帕罗克解释的方法做了。我想,我也在将对象添加到store对象中。但同样的情况并没有反映在用户界面上。下拉列表仍然为空。我能帮忙吗

我的选择框代码:

<div class="ecmSearchFormInputArea">
    <table class="ecmSearchFormInputArea">
                <tr>
                    <td class="propertyRowLabel">
                        <label><span class="mandatory_red"></span>Cost Center :</label>&nbsp;

                        <select data-dojo-attach-point="costCenter" id="costCenter"
                        data-dojo-type="dijit/form/FilteringSelect" style="width: 18em;" 
                        data-dojo-attach-event="onChange:loadDocStacks">
                        </select>
                    </td>
                </tr>
            </table>                                              
         </div>

成本中心:
我的JS

后创建:函数(){
此日志条目(“后创建”);
//正在尝试填充组合框
变量存储数据={
标识符:“成本中心”,
项目:[]
}
var jsonObj=[{
成本中心:“sc1”
},
{
成本中心:“sc2”
}]
dojo.addOnLoad(函数(){
var costcentrestore=new dojo.data.ItemFileWriteStore({data:storeData});
对于(var i=0;i

FOR循环中的警报显示正确的数据。我遗漏了什么吗?

添加标签属性和标识符。因为这将被用作填充的标签

var jsonObj = [{
            costCenter: 'sc1', name: 'label1'
        },
        {
            costCenter: 'sc2', name: 'label2'
        }];

var storeData = {
                identifier: 'costCenter', label: 'name',
                items: []
            };

您使用的是哪个版本的dojo?
var jsonObj = [{
            costCenter: 'sc1', name: 'label1'
        },
        {
            costCenter: 'sc2', name: 'label2'
        }];

var storeData = {
                identifier: 'costCenter', label: 'name',
                items: []
            };