both buttons popups same win but need to change edit button popup title as exists (Edit), & create(Add new record) button popup title to Add new record,
please help me to do this change...
2 Answers, 1 is accepted
0
Mihaela
Telerik team
answered on 13 Apr 2021, 09:54 AM
Hi Chiran,
Thank you for the screenshot.
Updating the popup window title could be achieved by subscribing to the "edit" event of the grid and changing the "title" property of the kendo.ui.Window:
$("#grid").kendoGrid({
...
editable: "popup",
edit: function(e) {
//if "Edit" button is clicked the selected data model is NOT new if (!e.model.isNew()) {
e.container.data("kendoWindow").title("Edit Updated");
} else {
e.container.data("kendoWindow").title("Add new record");
}
}
});
To handle the "Create" action, you could check if "e.model.isNew()" returns "True", since the 'edit' event handles both "Create" and "Edit" actions.
Here is a runnable Dojo sample for your reference: