Delete rows from spreadsheet

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    1 posts
    Member since:
    Jun 2015

    Posted 02 Aug Link to this post

     

    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

     

     

     

  2. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 04 Aug Link to this post

    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
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top