2
我能夠在dojox.grid.DataGrid中放置dijit.form.DateTextBox和dijit.form.ComboBox,但不能放入dijit.form.Button 。我還沒有嘗試過其他小工具。dojox.data.Grid中的小部件(dijit.form.Button)
new dojox.grid.DataGrid({
store: new dojo.data.ItemFileReadStore({data: {items: [{option: 'option A', date:'10/31/2011'},{option: option B'}]}}),
structure:[{
field: "option",
editable: true,
type: dojox.grid.cells._Widget,
widgetClass: dijit.form.ComboBox,
widgetProps: {
store: new dojo.data.ItemFileReadStore({data: {items: [{option: 'option A'},{position: option B'}]}}),
searchAttr: 'option'
},{
field: 'date',
editable: true,
type: dojox.grid.cells.DateTextBox,
widgetProps: {selector: "date"},
formatter: function(v) {if (v) return dojo.date.locale.format(new Date(v),{selector: 'date'})}
},{
field: "button",
type: dojox.grid.cells._Widget,
editable: true,
widgetClass: dijit.form.Button,
widgetProps: {style: {width: "100px"},label: "dijit button?"}
}]
})
Salu2,
何塞Leviaguirre
你應該在答案塊中發佈你的答案,然後接受它,這樣問題就是列表編輯回答 – Ted