Help Me please ... Is there a way to eliminate event code duplication?


I want to eliminate duplicate event codes.“AfterEditStart”, function(row, col) {
same code
});“AfterEditStart”, function(row, col) {
same code

How do I put the same event in both grids?
thank you


Hello @11135,

Solution 1: Use a named function.

function afterEditStart() {
    // ...your code
}“AfterEditStart”, afterEditStart);“AfterEditStart”, afterEditStart);

Solution 2: Extending Grid class

I hope this can help you :vulcan_salute: