By default, when the "paste" command is added, the default option is "insert" mode ("Paste (Insert)"). Is it possible to add an option that allows setting the default paste mode to "replace" ("Paste (Replace)")?
Hello Ben,
Thank you for your note.
While the built-in option is implemented, you can use the following workaround:
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()
.Name("grid")
.Events(ev => ev.DataBound("onDataBound"))
)
<script>
function onDataBound() {
var ddl = $(".k-grid-paste-action[data-role='dropdownlist']").getKendoDropDownList(); // get a reference to the DropDownList
ddl.dataSource.data([{text: "Paste (Replace)", value: "replace"}]); // update its data
ddl.value("replace"); // set the default option
}
</script>
Here is a REPL sample where you can test this example:
https://netcorerepl.telerik.com/cellvibx59FWPKgr14
I hope that helps.
Regards,
Mihaela
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.