mleibman / SlickGrid

A lightning fast JavaScript grid/spreadsheet
http://wiki.github.com/mleibman/SlickGrid
MIT License
6.81k stars 1.98k forks source link

Getback event from checkbox #1145

Open cedulux opened 7 years ago

cedulux commented 7 years ago

Hi,

I have an issue with the checkbox event. I'm not able to get the change event.

code source from my main php file

main.php

function alerting(value){ alert("Value:"+value); return {valid: true, msg: null}; } ... {id: "creation", name: "Creation", field: "creation", minWidth: 60, cssClass: "cell-effort-driven", field: "creation", formatter: Slick.Formatters.Checkmark, editor: Slick.Editors.Checkbox, validator: alerting} ...

And i moditied function CheckboxEditor on slick.editors.js

_this.validate = function () {

  if (args.column.validator) {
    alert("Value"+this.serializeValue());
    var validationResults = args.column.validator($select.val());
    validationResuts = this.serializeValue();

    if (!validationResults.valid) {
      return validationResults;
    }
  }
  return {
    valid: true,
    msg: null
  };
};_

The alert function return the right value in slick.editors.js but always true on my main function (main.php - function alerting).

How i can get the good value on my main file?

Thanks a lot for your attention.

PS: Maybee the answer exist in another post but i didn't find him.