Hi,
I am using the e.model.isNew() to change the Title of the popup depending on whether Edit or Save is pressed.
That's working fine, I am however having an issue with then pressing the edit button to the added item.
The pop up is shown but with "Add", not "Edit" as the title.
If I refresh the page then it works as expected.
Code:
function onEdit(e) {
if (e.model.isNew()) {
// add
$(".k-window-title").text("Add");
} else {
// edit
$(".k-window-title").text("Edit");
}
}
Is there a way on the save event to specify that the model is no longer new?
function onSave(e) {
// set the model no longer as new ??
}
I am using the e.model.isNew() to change the Title of the popup depending on whether Edit or Save is pressed.
That's working fine, I am however having an issue with then pressing the edit button to the added item.
The pop up is shown but with "Add", not "Edit" as the title.
If I refresh the page then it works as expected.
Code:
function onEdit(e) {
if (e.model.isNew()) {
// add
$(".k-window-title").text("Add");
} else {
// edit
$(".k-window-title").text("Edit");
}
}
Is there a way on the save event to specify that the model is no longer new?
function onSave(e) {
// set the model no longer as new ??
}