Я готовлю один объект столбца и добавляю в свою сетку. Сюда.
myGrid.setColumns(myColumns);
Вот как выглядит код моего столбца.
var myColumns = [ {
"header":"myCol1",
"dataIndex":"myCol1",
"flex":1
},{
"header":"myCol2",
"dataIndex":"myCol2",
"flex":1,
},{
"xtype":"widgetcolumn",
"header":"myCol3",
"dataIndex":"myCol2",
"flex":1,
"widget": {
"xtype": "numberfield",
"decimalPrecision" :5,
"minValue": 0,
"bind": "{record.appliedQty}"
}
}
]
В myCol3
У меня есть столбец виджета, я хочу применить событие blur
в myCol3
. Теперь вот моя сетка. Кто-нибудь может мне помочь, как дать опцию blur
в моей сетке для столбца.
Вот как я определяю свою сетку.
var myGrid = Ext.create('Ext.grid.Panel', {
columns: [],
height: "300px",
plugins: [{
ptype: 'rowexpandergrid', // This is grid which appear on expand of row.
gridConfig: [{
columns: [],
autoWidth: true,
autoHeight: true,
}]
}],
store: myStore
selModel: Ext.create('Ext.selection.CheckboxModel', {
listeners: {
select: function (_this, record, index, eOpts) {
// Some action happening here.
},
deselect: function (_this, record, index, eOpts) {
// Some action happenin here.
}
}
})
},
me.gridConfig[0],
);