1 回答
TA贡献1853条经验 获得超9个赞
一种解决方案是编辑记录的所需字段(在您的情况下为“Test2”),如下所示:
{
xtype: "widgetcolumn",
header: "Value",
dataIndex: "Test1",
itemId: "landedGrossQty",
flex: 1,
widget: {
xtype: "numberfield",
minValue: 0,
listeners: {
change: function(field, newValue, o, e) {
let record = field.getWidgetRecord(); //getting the store record
record.data.Test1 = newValue; //setting the value of this field to its new value
record.data.Test2 = newValue * 2 //setting the value of Test2 field to Test1*2;
record.commit(); //commiting the changes to the store
}
}
}
}
添加回答
举报