I’m waiting for the renewal of the support (it was approuved for the next year budget).

Looking a little deeper I saw the editEnd event is executed, in effect, but only after the onClick of the button : if I submit the form in onClick of the button data are sent incorrectly because editEnd was not still fired.

In small testcase I prepared  You’ll see in  simplest way I found the onClick is fired before the editEnd.

I simply modified the grid/cell-editing example adding a little code as You can see below.

Could You help me to solve that issue ?


<div><!DOCTYPE html></div>
<div><html xmlns=”http://www.w3.org/1999/xhtml”></div&gt;
<div>    <title>Grid Cell Editing Demo</title></div>
<div>    <meta http-equiv=”X-UA-Compatible” content=”IE=edge” /></div>
<div>    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /></div>
<div>    <meta name=”viewport” content=”width=device-width, initial-scale=1.0, maximum-scale=1.0″ /></div>
<div>    <link rel=”stylesheet” type=”text/css” href=”../../../source/styles/smart.default.css” /></div>
<div>    <link rel=”stylesheet” type=”text/css” href=”../../styles/demos.css” /></div>
<div>    <link rel=”stylesheet” type=”text/css” href=”styles.css” /></div>
<div><body class=”viewport” onload=”carrelloInit()”></div>
<div>    <script></div>
<div>function carrelloInit() {</div>
<div>const grid = document.getElementById(‘grid’);</div>
<div>    console.log(“Fatto 1”);</div>
<div>    grid.addEventListener(‘endEdit’, function (event) {</div>
<div>    const detail = event.detail,</div>
<div>        id = detail.id,</div>
<div>        dataField = detail.dataField,</div>
<div>        row = detail.row,</div>
<div>        column = detail.column,</div>
<div>        cell = detail.cell,</div>
<div>        data = detail.data,</div>
<div>        value = detail.value;</div>
<div>        console.log(“Modified ” + dataField + ” / ” + id + ” / ” + value);</div>
<div>function confermaCarrello() {</div>
<div>    console.log(“Carrello confermato”)</div>
<div><div class=”demo-description”></div>
<div><h1>Grid Cells Editing</h1></div>
<div>Click on any cell to begin edit its value. To confirm the changes, press ‘Enter’ or click on another cell or outside the Grid. To cancel the changes, press ‘Escape’.</div>
<div>    <smart-grid id=”grid”></smart-grid></div>
<div>    <button id=”b1001105″ class=”cfg-button cfg-button-floating” type=”button” role=”button” onclick=”confermaCarrello();”><span class=”cfg-button-text”>Annulla</span></button></div>
<div>    <!– scripts –></div>
<div><script src=”../../../common/data.js”></script></div>
<div>    <script src=”../../../source/modules/smart.grid.js”></script></div>
<div><script src=”../../../source/modules/smart.button.js”></script></div>
<div><script src=”index.js”></script></div>