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

Delete rows from spreadsheet

1 Answer 117 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 02 Aug 2016, 02:12 PM

 

Hi, I'm trying to UPDATE and DELETE some rows from the spreadheet control, with datasource binding.

I've a custom defined button with save function:

 $("#savebuttons").on('click', '#Save', function () {
        if (!$(this).hasClass("k-state-disabled")) {
            getDataSource().sync();
        }

    });

The datasource looks like this:

           .DataSource<Siergy.BackOffice.Models.Management.ProjectElementViewModel>
            (ds => ds 
            .Ajax()
            .Batch(true)
            .Read(read => read.Action("ProjectElementsSpreadsheet_Read", "ProjectsManagement"))
            .Update(update => update.Action("ProjectElementsSpreadsheet_Update", "ProjectsManagement"))
            .Create(create => create.Action("ProjectElementsSpreadsheet_Create", "ProjectsManagement"))
            .Destroy(destroy => destroy.Action("ProjectElementsSpreadsheet_Destroy", "ProjectsManagement"))
            .Events(e => e.Change("onChange"))
            .Model(m =>
            {
                m.Id(p => p.IdElement);
            })
            );

All is working well to update rows, but destroy action never fires in the server, how can I get this working?

From DataSource documentation:

sync
Saves any data item changes.
The sync method will request the remote service if:
the transport.create option is set and the data source contains new data items
the transport.destroy option is set and data items have been removed from the data source
the transport.update option is set and the data source contains updated data items

Is it valid for spreadsheet datasources too?

Best Regards

 

 

 

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 04 Aug 2016, 10:14 AM
Hello,

An issue for this has been created in our github and you can monitor it here:
https://github.com/telerik/kendo-ui-core/issues/2030

Regards,
Bozhidar
Telerik by Progress
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
Tags
Spreadsheet
Asked by
Daniel
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or