0
votes

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:

see encircled in red

The "data" encircled in red. How do get those information? I believe inside "data" are the information to when I clicked the certain row.

1
are you binding this information to grid? or you want to access it and explicitly load it on the grid?Mutant
It is hard to say what exactly your problem is... Do want to access fields of a record? Do you want to load records into a grid and show specific fields?sra
I already loaded the data into the grid.Panel and with a listener I want to access the records in order to do another action.oneofakind
The best answer here will depend on your next action, if for example you want to update a single record in a database, the approach would be very different than if you wanted to export the entire dataset to file for example. What is your goal?dougajmcdonald

1 Answers

1
votes

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');
    }});