I am looking for the following:
Before Edit:
----------------------
| foo1 | foo2 | foo3 |
----------------------
| Mary | 1111 | Ford |
| Vlad | 2222 | _MG_ |
| Lisa | 3333 | Saab |
----------------------
Cell changed:
----------------------
| foo1 | foo2 | foo3 |
----------------------
| Mary | 1111 | Ford |
| Vlad | ____ | _MG_ |
| Lisa | 3333 | Saab |
----------------------
Desired Effect:
----------------------
| foo1 | foo2 | foo3 |
----------------------
| Mary | 1111 | Ford |
| Vlad | ____ | ____ |
| Lisa | 3333 | Saab |
----------------------
What’s happening right now:
----------------------
| foo1 | foo2 | foo3 |
----------------------
| Mary | 1111 | Ford |
| Vlad | ____ | _MG_ |
| Lisa | 3333 | Saab |
----------------------
Requirement: In the row when the user changes the value in ‘foo2’, I want the value erased in ‘foo3’, as well.
I’m unsure what is the correct way to go: cellvaluechanging, or cellendedit.
Current code:
{text: 'foo2', dataField: 'foo2', columntype: 'dropdownlist',
cellvaluechanging: function (row, datafield, columntype, oldvalue, newvalue) {
if (oldvalue != newvalue)
$("#jqxgrid").jqxGrid('setcellvalue', row, 'foo3', "");
},
{text: 'foo3', dataField: 'foo3', columntype: 'dropdownlist'}