Whenever I tried to edit a value of a cell to a value same as my previous edit, it will revert back to the original value of the cell.
Steps to reproduce:
1. append ‘x’ to cell value of the first row.
result OK: x242.26
2. append ‘x’ to cell value of the second row. value is not changed.
result NG: 242.26
Code:
function initMsgCodeGrid() {
var data = new Array();
var msgCodes =
[
“242.26”, “242.26”, “242.27”
];
var msgCodesFilters =
[
“242.26”, “242.27”
];
for (var i = 0; i < msgCodes.length; i++) {
var row = {};
row[“msg_code”] = msgCodes[i];
data[i] = row;
}
var source =
{
localdata: data,
datatype: “array”
};
var dataAdapter = new $.jqx.dataAdapter(source, {
loadComplete: function (data) { },
loadError: function (xhr, status, error) { }
});
$(“#msgCodeGrid”).jqxGrid(
{
editable: true,
editmode: ‘click’,
source: dataAdapter,
columns: [
//{ text: ‘MSG_CODE’, datafield: ‘msg_code’, width: 100 }
{text: “MSG_CODE”, datafield: “msg_code”, columntype: ‘combobox’, width: 250,
createeditor: function (row, column, editor) {
editor.jqxComboBox({ source: msgCodesFilters, width: ‘200px’, height: ’25px’});
}
}
]
});
}