遇到一个有趣的问题。
输出带有自定义渲染的 GridPanel。渲染器在运行时输出一个基本的 html 输入字段,但是我无法在输入中选择文本。我可以编辑它,但如果我必须在输入框内单击并拖动,我将无法选择文本。
这是一段摘录:
tsGrid = new Ext.grid.GridPanel({
id : 'gridTimes',
store : gridStore,
border : false,
deletedLineIDs : [],
viewConfig : {
forceFit : true
},
plugins : [
actionColumn
],
cm : new Ext.grid.ColumnModel([
{id:'client',header: "client", width: 40, sortable: true, dataIndex: 'client'},
{header: "product", width: 20, sortable: true, dataIndex: 'product'},
{header: "job", width: 20, sortable: true, dataIndex: 'job'},
{header: "task", width: 20, sortable: true, dataIndex: 'task'},
{header: "notes", width: 20, sortable: true, dataIndex: 'notes'},
{header: "cancomplete", width: 20, sortable: true, dataIndex: 'cancomplete'},
{header: "Monday", width: 20, sortable: true, dataIndex: '0', cls : 'suppresspadding mon',renderer : function(v, p, record){return '<input tsid="' + record.id + '" class="x-form-field x-form-text" unselectable="off" onFocus="this.select()" value="' + v + '">';}},
{header: "Tuesday", width: 20, sortable: true, dataIndex: '1', cls : 'suppresspadding tue',renderer : function(v, p, record){return '<input tsid="' + record.id + '" class="x-form-field x-form-text" onFocus="this.select()" value="' + v + '">';}},
{header: "Wednesday", width: 20, sortable: true, dataIndex: '2', cls : 'suppresspadding wed',renderer : function(v, p, record){return '<input tsid="' + record.id + '" class="x-form-field x-form-text" onFocus="this.select()" value="' + v + '">';}},
])
})
有任何想法吗?