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

Kendo Spreadsheet live updates

3 Answers 188 Views
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 12 Feb 2020, 01:50 AM
I'm in the evaluation stage of working with the Spreadsheet.  I need the ability to load a file and then read each row and send the data to an web api.  The data that is returned will need to update the row.  Sometimes there may be a 1000 or more rows.  When I get back the api data can I update the individual cells or do I need to build a array and when I'm done load it?  I would like for the end user to see the updates as they happen and have it scroll down as the rows are being updated .

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 13 Feb 2020, 12:35 PM

Hello,

You can update and individual item from the Spreadsheet by using the set method of the dataSource object. Here is an example how you can update a sell data - https://stackblitz.com/edit/b43vsh?file=index.js.

Scrolling to the item is not option yet if you want to achieve similar behavior one possible workaround would be to find the scrollable element manually in the DOM and perform the scroll to the desired position manually with javascript.

Hope this information will be helpful. If you have further questions please don't hesitate to contact us again.

Regards,
Plamen
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
ela
Top achievements
Rank 1
answered on 06 Mar 2020, 05:35 AM

I need the ability to load a file and then read each row and send the
data to an web api.  The data that is returned will need to update the
row.

Well I find the answer by the admin in this thread.

This is really helpful section, Would love to explore more here.

Regards Ela Leri - Editor cat doors

0
Plamen
Telerik team
answered on 09 Mar 2020, 12:02 PM

Hi,

You can get the data of the first row in a similar manner by using the dataSource of the ActiveSheet as for example in the code below:

  click: function(){
        var spreadsheet = this.$refs.spreadsheet.kendoWidget();
        alert(spreadsheet.sheets()[0].dataSource.data()[0].ProductName)
      }

Here is an updated stackblitz - https://stackblitz.com/edit/b43vsh-bfycdn?file=index.js.

Once you have it you can send it to the desired web api.

Regards,
Plamen
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
William
Top achievements
Rank 1
Answers by
Plamen
Telerik team
ela
Top achievements
Rank 1
Share this question
or