我有一个网格,并有2列Name, Age
。这个网格中有几行(如20-30条记录)。现在当我点击一行时,我需要获取Person的名称并将其显示在Label上。从网格行选择不工作
我想,如果我使用getRowClass: function(record, rowIndex, rowParams, store)
我可以得到所选行值的详细信息。但是,这不起作用。有人能帮我吗 ?
xtype: 'gridpanel',
height: 500,
width: 800,
title: 'Person Grid',
store: 'Person',
viewConfig: {
getRowClass: function(record, rowIndex, rowParams, store) {
console.log("Print the selected row data and set to label");
console.log(record);
console.log(rowIndex);
console.log(rowParams);
}
},
columns: [ .....