New to Kendo UI for jQueryStart a free 30-day trial

AddDrawing

methods

Adds a new drawing to this sheet.

Parameters:drawingObject

This can contain the same properties as you can pass to sheets.drawings configuration options.

Returns:Object

an internal Drawing object containing the passed properties. The internals of this object are not intended to be public API at this point, but you can pass this object reference to removeDrawing if you want to remove this drawing.

<div id="spreadsheet"></div>
<script>
$("#spreadsheet").kendoSpreadsheet();

var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
var sheet = spreadsheet.activeSheet();

// Add a drawing to the sheet
var drawing = sheet.addDrawing({
    topLeftCell: "B2",
    offsetX: 10,
    offsetY: 10,
    width: 200,
    height: 100,
    type: "image",
    src: "https://via.placeholder.com/200x100"
});

console.log("Drawing added:", drawing);
</script>
Not finding the help you need?
Contact Support