51
rated 0 times
[
54]
[
3]
/ answers: 1 / hits: 20042
/ 11 Years ago, tue, june 4, 2013, 12:00:00
I've got a Kendo UI Grid that loads a popup when creating a new or editing an existing record.
I struggling to find a way to change the change the text of the Update button to Save when I'm creating a new record (it currently says Update - and its not correct).
I was able to change the title of the popup window, but my question is: how do I change the button text?
This is the code:
$(#grid).kendoGrid({
dataSource: dataSource,
pageable: true,
sortable: true,
groupable: true,
height: resizeGrid(),
filterable: true,
toolbar: [create],
columns: [
{ field: OfficeName, title: Office Name },
{ field: SupportNo, title: Phone No., width: 100px },
{ field: SupportEmail, title: Email Address, width: 130px },
{ field: SupportFax, title: Fax No., width: 100px },
{ field: SupportFtp, title: Ftp Url, width: 150px },
{ command: [edit, destroy], title: Actions, width: 160px }],
editable: popup,
edit: function (e) {
var editWindow = e.container.data(kendoWindow);
if (e.model.isNew()) {
e.container.data(kendoWindow).title('Add New Office');
$(.k-grid-update).text = Save;
}
else {
e.container.data(kendoWindow).title('Edit Office');
}
}
});
More From » jquery