-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
C: GridEnhancementFP: UnplannedSync status with associated Feedback ItemSync status with associated Feedback ItemjQuery
Description
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)")?
For example:
$("#grid").kendoGrid({
toolbar: ["paste"],
allowPaste: {
default: "replace"
},
...
});
Workaround
- Handle the "dataBound" event of the Grid and get a reference to the Toolbar DropDownList.
- Use the data() method of the DropDownList's DataSource to set only the "replace" option.
- Call the value() method to update the default pasting option.
<script>
function onDataBound() {
var ddl = $(".k-grid-paste-action[data-role='dropdownlist']").getKendoDropDownList();
ddl.dataSource.data([{text: "Paste (Replace)", value: "replace"}]);
ddl.value("replace");
}
</script>
Metadata
Metadata
Assignees
Labels
C: GridEnhancementFP: UnplannedSync status with associated Feedback ItemSync status with associated Feedback ItemjQuery