Is there any way i can trigger autosave in RadSpreadSheet?
Or
Is there a way to determine the user have edited the spread so that i can trigger a function to get the values to a hidden variable?
Can ActiveCellModeChanged be used for this? if so how do i do it?
Please help me with this.
2 Answers, 1 is accepted
0
Accepted
Peter Milchev
Telerik team
answered on 28 May 2020, 10:05 AM
Hello Suresh,
The Spreadsheet does not have an autosave functionality, but you can use the setTimeout+clearTimeout combination to achieve a similar behavior and either save the workbook to a JSON or call the save() method.
<script>functionOnClientChange(sender, args) {
clearTimeout(sender.__changeTimeout)
sender.__changeTimeout = setTimeout(function () {
var spreadsheet = sender;
// call SaveWorkbook of the Spreadsheet provider//spreadsheet.save();// get the spreadsheet as a JSON object and then string//var jsonObj = spreadsheet.get_kendoWidget().toJSON();//var jsonString = JSON.stringify(jsonObj);
alert("5 seconds after the last change of the Spreadsheet");
}, 5000)
}
</script><telerik:RadSpreadsheetrunat="server"ID="RadSpreadsheet1"OnClientChange="OnClientChange"></telerik:RadSpreadsheet>
Regards,
Peter Milchev
Progress Telerik
Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic. Our thoughts here at Progress are with those affected by the outbreak.