2014-10-06 89 views
0

我正在從我的網格中檢索記錄。Record Get方法似乎不起作用

var record = myGrid.store.getAt(j); 

當我實地考察一下在record.data我得到一個字符串值:

console('record.data ' + record.data['groupSelected']) //something!! 

然而,當我使用record.get方法得到了一個未定義。

console('record.get[groupSelected] ' + record.get['groupSelected']) //nothing!! 

我是否正確使用記錄對象?

回答

1

錯誤類型的括號。

console('record.get(groupSelected) ' + record.get('groupSelected')) //nothing!! 

應該這樣做。

+0

愚蠢的我。謝謝你才意識到自己 – 2014-10-06 10:07:52