This is a migrated thread and some comments may be shown as answers.

AutoSave In RadSpreadSheet

2 Answers 270 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Suresh Krishna
Top achievements
Rank 1
Suresh Krishna asked on 25 May 2020, 03:25 PM

Hi,

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

Sort by
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>
    function OnClientChange(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:RadSpreadsheet runat="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.
0
Suresh Krishna
Top achievements
Rank 1
answered on 04 Jun 2020, 04:37 AM
Thank you!! It works.
Tags
Spreadsheet
Asked by
Suresh Krishna
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Suresh Krishna
Top achievements
Rank 1
Share this question
or