我使用ExtJS的4.2ExtJS的电网滚动修复需要
下面是我在它即11个工作
Ext.create('Ext.data.Store', {
storeId: 'simpsonsStore',
fields: ['name', 'email', 'phone'],
data: {
'items': [{
"name": "Lisa",
"email": "[email protected]",
"phone": "555-111-1224"
}, {
"name": "Bart",
"email": "[email protected]",
"phone": "555-222-1234"
}, {
"name": "Homer",
"email": "[email protected]",
"phone": "555-222-1244"
}, {
"name": "Marge",
"email": "[email protected]",
"phone": "555-222-1254"
}]
},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});
Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [ {
header: 'Email',
dataIndex: 'email',
flex: 1,
editor: {
xtype: 'textfield',
selectOnFocus: true,
allowBlank: false
}
}, {
header: 'Phone',
dataIndex: 'phone'
}, {
header: 'Phone',
dataIndex: 'phone'
}, {
header: 'Phone',
dataIndex: 'phone'
}, {
header: 'Phone',
dataIndex: 'phone'
}, {
header: 'Phone',
dataIndex: 'phone'
}, {
header: 'Phone',
dataIndex: 'phone'
}, {
header: 'Phone',
dataIndex: 'phone'
},{
header: 'Name',
dataIndex: 'name',
editor: 'textfield'
}],
selModel: {},
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})
],
height: 200,
width: 900,
renderTo: Ext.getBody()
});
具体的代码,当我在它跳到第一列名称点击。
等待帮助。谢谢。 Goog Luck
请使用的jsfiddle增加你的答案的机会,喜欢这里http://jsfiddle.net/rixo/vdazU/重新您的问题 –
使用HTTP ://fiddle.sencha.com来描述你的问题。这对我们非常有帮助。 – Tyr