Author Topic: getData from popup  (Read 2183 times)

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
getData from popup
« on: April 16, 2019, 01:07:18 pm »
I have a grid where a user can use context menu on a row to open a new grid (popup).
I would like to use the id from row clicked and insert into datamodel.url for the popup grid to make php select with this id.

How do get the id from row?

Code: [Select]
url: "/php/data.php?id="+//get id from row where context menu was activated

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: getData from popup
« Reply #1 on: April 16, 2019, 01:23:14 pm »
ui argument of the callback provides coordinates of cell ( rowIndx, rowIndxPage, rowData, column, dataIndx )

Code: [Select]
action: function(evt, ui, item){
     //get id of row.
     var id = ui.rowData[ dataIndx of id field ]                         
}
« Last Edit: April 16, 2019, 01:25:55 pm by paramquery »

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
Re: getData from popup
« Reply #2 on: April 16, 2019, 05:14:03 pm »
Thank you.
« Last Edit: April 16, 2019, 05:26:41 pm by queensgambit9 »