Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

256
Views
How to get selected item from table on button click in object editor pimcore?

I have added a button in pimcore panel in object editor. On button click how can I fetch selected records from the table?

Table:

Table Screenshot

So far I have tried this:

 postOpenObject: function (object, type) {
     object.toolbar.add({
         iconCls: 'pimcore_icon_export',
         scale: 'small',
         handler: function () {                        
             const req = new XMLHttpRequest();
             // I need to pass selected items in a function
             req.open("GET", '/admin/export-xyz/', true);
         }.bind(this, object)
     });
     pimcore.layout.refresh();
 },
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As you are passing object in bind, you can object.search.grid.getSelectionModel().getSelection(); Then make a loop to find the selected row.

handler: function () {                        
      const req = new XMLHttpRequest();
      // I need to pass selected items in a function
      let selections = object.search.grid.getSelectionModel().getSelection();

for (let i= 0; i < selections.length; i++) {
   console.log(selections[i].id);
}
      req.open("GET", '/admin/export-xyz/', true);
 }.bind(this, object)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!