Author Topic: onChange of select  (Read 104 times)

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 149
    • View Profile
onChange of select
« on: July 11, 2024, 05:46:17 pm »
How can I trigger the onchange event of a select item to get the selected value and the rowData for that row? Should i use editor?

{
title: "Actions",
editor: { type: "select", options: ["","Action 1 for this row...","Action 2 for this row..."] }
}

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: onChange of select
« Reply #1 on: July 12, 2024, 02:17:42 pm »
There is editor.getData callback to obtain selected value and rowData.

https://paramquery.com/pro/api#option-column-editor

Code: [Select]
getData: function( ui ){
  var val = ui.$cell.find('select').val();
  var rowData=  ui.rowData;
}