음, 이벤트는 itemdblclick (dblclick 없음)입니다. 그리고 행은 핸들러에 인수로 전달됩니다. 예를 들어
, 후속 샘플에서 때 당신은 경고 팝업 창이 선택한 심슨의 이름을 표시 볼 수있는 행을 더블 클릭 :
이
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: [
{ text: 'Name', dataIndex: 'name' },
{ text: 'Email', dataIndex: 'email', flex: 1 },
{ text: 'Phone', dataIndex: 'phone' }
],
height: 200,
width: 400,
listeners: {
itemdblclick: {
fn : function(grid, record) {
alert(record.get('name'));
}
}
},
renderTo: Ext.getBody()
});
또한 여기서 일을 볼 수 있습니다 http://jsfiddle.net/lontivero/utjyd/1/를
행운을 빈다.
격자 패널에 dblclick 이벤트가 직접 있다고 생각하지 않았습니다. 아마 행 선택 모델을 사용하고 있습니까? – dougajmcdonald