Grid中的TextBox无法正常工作

时间:2009-09-02 10:43:16

标签: datagrid dojo

不在textBox内显示空格类型。并且需要两次点击才能接受焦点。试试吧 http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/grid/tests/test_grid_formatters.html

我使用FF 3.5

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

这对我有用:只需单击即可编辑单元格并选择(以蓝色突出显示)

var widgetProps = { onFocus: function () { this.textbox.select() } }

var layout = [{
    field: 'col1',
    editable: true,
    widgetProps: widgetProps,
    type: dojox.grid.cells._Widget
}];

var grid = new dojox.grid.DataGrid({
    id:'myGrid',
    store:new dojo.data.ItemFileWriteStore({data:{identifier:'id',lable:'label',items:[]}),
    singleClickEdit:true,
    selectionMode:'single',
    structure:layout,
    selectable:false},document.createElement('div'))

    dojo.body().appendChild(grid.domNode);
    grid.startup();