Hello all,
I'm having a problem updating a row after an inline edit. My ColModel is:
colModel: [
{ name: 'Email', index: 'Email', editable: true },
{ name: 'ReferenceEmail', index: 'ReferenceEmail', editable: true },
// hidden: true, editable: true, editrules: { edithidden: true}
{ name: 'Title', index: 'Title', editable: true, edittype: "select",
editoptions: { value: "Mr:Mr;Mrs:Mrs;Ms:Ms;Doctor:Doctor;Sir:Sir"} },
{ name: 'Forename', index: 'Forename', editable: true },
{ name: 'Surname', index: 'Surname', editable: true },
{ name: 'Study_Manager', index: 'Study_Manager', editable: true,
edittype: "select", editoptions: { value: "True:True;False:False"} }
]
I plan to set the referenceemail col value = the new edited email value, so i have:
ondblClickRow: function (id, ri, ci) {
lastSelUser = id;
$("#UserGrid").editRow(id, true, false, reload);
}
which in turn calls reload onsuccess of the edit,
function reload(result) {
var cell = $("#UserGrid").getCell(lastSelUser, 'Email');
var newEmail = $(cell).val();
$("#UserGrid").saveRow(lastSelUser, false);
$("#UserGrid").setRowData(lastSelUser, { ReferenceEmail: newEmail });
var ref = $("#UserGrid").getCell(lastSelUser, 'ReferenceEmail');
alert($(cell).val());
alert($(ref).val());
}
Now my reference email doesnt get updated - the alert of the cell value
returns correctly, but the alert of the ref(referenceemail) value
is undefined and i've checked that the id is infact correct.
I've tried putting the saverow
after the setRowData
, but that makes no difference to the outcome.
Once again, I greatly appreciate any and all insight into the problem.
Regards, Byron Cobb