我有外部API, 代理人休息了, 读者定义的 类型:“ json”, rootProperty:'数据;
如何获取属性“ FullName” 我已经尝试过record.get('FullName')。
创建的名为getDetails的函数,作为参数字符串传递,返回 返回record.get('FullName),始终未定义。
Details: function(v, record) {
return record.get('FullName')
}
这是onDelete函数:
OnDelete: function (record,data) {
Ext.Msg.confirm('Delete Changes', 'Do you want to delete' + " " + record.Details, function (choice) {
if (choice === 'yes') {
var store = Ext.getStore('store.Personnel');
store.remove(record);
store.sync();
}
})
},
答案 0 :(得分:0)
您应使用record.get('FullName')之类的
OnDelete: function (grid, rowId) {
var record = grid.getStore().getAt(rowId);
Ext.Msg.confirm('Delete Changes', 'Do you want to delete' + " " + record.get('FullName'), function (choice) {
if (choice === 'yes') {
var store = grid.getStore();
console.log(store)
store.remove(record);
}
})
}