3 Answers, 1 is accepted
Hello,
Thank you for reporting this issue. I tried to replicate the reported behavior locally, but was unable to reproduce it. I'm attaching a screen-cast where a row is deleted from the demo Spreadsheet, available on the Spreadsheet demo page. Along with it you'll also find a sample application implementing the example from the Spreadsheet demo page. Would it be possible to modify the provided demo solution or send a sample project where the reported behavior is isolated, so I can investigate further?
Looking forward to your reply.
Regards,
Aleksandar
Progress Telerik

Hello, again,
Because i cannot upload a file different from image here on the forums i have uploaded it here: https://filebin.net/aqnceetk0nbecnf9
The changes i made were only that i'm specifying the number of rows i have and removed the merged cells for simplicity.
What i expect when i right click and then select 'Delete' would be to have 4 rows visible left, then 3 and so on, without having any empty rows available to fill with data.
Thank you
Hello,
The desired result can be achieved by binding custom function to the deleteRow event. Each time you delete a row you can hide a row as the deleteRow method shifts the remaining contents of the sheet up.
@(Html.Kendo().Spreadsheet() .Name("spreadsheet") .Events(ev=>ev.DeleteRow("onDeleteRow")) ...
function onDeleteRow(e) {
var rowCount = e.sheet.toJSON().rows.length;
setTimeout(function () {
e.sheet.hideRow(rowCount - 1)
}, 0);
}
Attached you'll find the modified sample project where the above suggestion is implemented.
Regards,
Aleksandar
Progress Telerik