EXTJS Grid Panel Listener - Retrieving Data from an Object
Domanda
Guys, I'm quite new to extJS and I would like your help. I have this Grid.Panel with listeners, I don't know if i got it right. Anyway, I got it to print out its properties but I cant get the data. Here is what the console printed out.
Object { internalId=, raw={...}, data={...}, more...}
after clicking it:
The "data" encircled in red. How do get those information? I believe inside "data" are the information to when I clicked the certain row.
Soluzione
You can add a load listener on the grid store as suggested by @sra and iterate over records to perform another operation.
gridStore().load({
callback : function(records, operation, success) {
//Iterate over each record and get data from record
var name = records[0].get('name');
}});
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow