1

我在网上到处寻找这个“简单”的问题,没有答案!
如何像这个例子一样将选择输入字段嵌入到 dgrid 中:
假设我们有这个列:

editor({ 
                    label: "name", 
                    autoSave:true, 
                    field: "f_name", 
                    className: 'style4' 
            }, "text", "dblclick") 
4

2 回答 2

2

基于弗雷德里克答案的答案:

editor({
    label: "subject",
    field: "subject",
    editorArgs: {
        style: "width:75px;",
        options: [
            {value: "true", label: "true"},
            {value: "false", label: "false"}
        ]
    }
}, Select, "dblclick")
于 2013-01-18T22:36:25.450 回答
2

尝试这样的事情:

"dgrid.editor({
                    field: 'state',
                    editorArgs: {store: stateStore, style: 'width:120px;', maxHeight: -1}
                }, dijit.form.Select)"

这是示例:https ://github.com/SitePen/dgrid/blob/master/test/GridFromHtml_Editors.html

于 2013-01-17T14:58:03.580 回答