Author Topic: onchange event for cell  (Read 2786 times)

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
onchange event for cell
« on: May 14, 2020, 12:31:23 am »
How can I trigger an event when a user edits a cell value. For Example, when the user change the revenue cell, I want to set the profits column. I tried render, but that gets triggered too often.

https://jsfiddle.net/xhk6yzwd/




paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: onchange event for cell
« Reply #1 on: May 14, 2020, 09:25:04 am »
It seems you are trying to setup column dependencies, for which javascript formulas are the right fit.

https://paramquery.com/pro/demos/grid_formula

https://paramquery.com/pro/api#option-formulas

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Re: onchange event for cell
« Reply #2 on: September 20, 2021, 04:05:37 pm »
I need to update a column, whenever another column in the row changes value. However, the initial value of the column has its own dataIndx. Could this still be accomplished via formula?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: onchange event for cell
« Reply #3 on: September 20, 2021, 08:55:08 pm »
In that case change event can be used.

https://paramquery.com/pro/api#event-change