[solved] Button to alter value in column with column combo doesn't trigger save


I want to use a ‘button’ to set the value of a combobox field to 0.
This button is present on every row in the grid because it is a column combobox (see xml).
The button is triggered through the “onRowSelect” event and inside the event checked using getColumnId().
Inside the event you enter a dhtmlx.confirm and if the user confirms, I wish to set the value/option of the combo at that row, to 0, and hopefully trigger the updated event to have the change saved.

I am able to change the value using grid.cells(‘1_20’,2).setValue(0);
But this doesn’t trigger the event that should save the new value.
My attempts to use other methods simply results in errors since they assume this cell is a combo which somehow it isn’t.
Examples I’ve found sofar haven’t targeted this scenario and I am hoping the community can shed some light on this.

Apologies for the xml spam and thanks in advance for any help.

The grid loads the following xml:
<column id="project" type="ro" align="left" width="" sort="strci">Projectnumber</column>
<column id="template" type="ro" align="left" width="
" sort="strci">Template</column>
<column id="name" type="combo" align="left" width="*" sort="strci" xmlcontent="1" filter="true">Name
<option value="0">[none]</option>
<option value="1">apple</option>
<option value="2">melon</option>
<option value="3">orange</option>
<option value="4">lemon</option>
<option value="5">grape</option>
<column id="btndelete" type="ro" align="left" width="80" sort="strci"/>
<call command="attachHeader">
<row id="1_20">
<cell>Interesting value</cell>


Finally found the reason why setValue() didn’t trigger a save.
In this case you have to set it yourself using:

I saw a couple of posts about how to alter values WITHOUT triggering events so I assumed triggering events would not require any extra steps.


You’re right.

In case of changing the cell value using the API (like the setValue method) you need to trigger the setUpdated() manually.
This is the designed behavior.