This is a migrated thread and some comments may be shown as answers.

Kendo grid Edit & create button popup title change

2 Answers 1757 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chiran
Top achievements
Rank 1
Iron
Iron
Chiran asked on 08 Apr 2021, 10:34 AM

Hi,

I'm trying to change kendo grid Edit & create button popup titles,

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

Sort by
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:

https://dojo.telerik.com/IKaBIQAG

If you have any other queries, don't hesitate to let me know.

 

Regards, Mihaela Lukanova Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Chiran
Top achievements
Rank 1
Iron
Iron
commented on 21 Sep 2021, 01:19 PM

Thanks.
0
Abdulsalam Elsharif
Top achievements
Rank 2
Iron
Iron
answered on 08 Sep 2021, 03:07 PM

You can change the "Create a new record" button title as the following

.ToolBar(toolbar => toolbar.Create().Text("New Page Title"))
Thanks
Nikolay
Telerik team
commented on 13 Sep 2021, 08:48 AM

This is, indeed, a valid approach to update the "Add new record" button text.
Chiran
Top achievements
Rank 1
Iron
Iron
commented on 21 Sep 2021, 01:19 PM

Thanks.
Tags
General Discussions
Asked by
Chiran
Top achievements
Rank 1
Iron
Iron
Answers by
Mihaela
Telerik team
Abdulsalam Elsharif
Top achievements
Rank 2
Iron
Iron
Share this question
or