Paste into Spreadsheet component doesn't update datasource after updating to version 2021.1.224
1 Answer 4 Views
Carlos
Top achievements
Rank 1
Veteran
Carlos asked on 08 Jul 2021, 12:14 PM

When I paste rows from an excel sheet and try to sync the datasource the submit event doesn't include the pasted rows.  This works fine in version 2020.2.513, but doesn't in version 2021.1.224.  Any ideas?


@(Html.Kendo().Spreadsheet()
        .Name("CommentsSpreadsheet")
        .HtmlAttributes(new { style = "width:100%;" })
        .Toolbar(false)
        .Sheetsbar(false)
        .Sheets(sheets =>
        {
            sheets
            .Add()
            .Name("Comments")
            .DataSource<DocumentCommentSpreadsheetEntry>(ds =>
                ds.Custom()
                .Batch(true)
                .Transport(t => t.Read("onRead").Submit("onSubmit"))
                )
            .Columns(columns =>
            {
                columns.Add().Width(100);
                columns.Add().Width(100);
                columns.Add().Width(100);
                columns.Add().Width(200);
                columns.Add().Width(200);
                columns.Add().Width(200);
                columns.Add().Width(200);
                columns.Add().Width(300);
                columns.Add().Width(300);
            })
            .Rows(rows =>
            {
                rows.Add().Height(30).Cells(cells =>
                {
                    cells.Add()
                            .Bold(true)
                            .Background("#015991")
                            .TextAlign(SpreadsheetTextAlign.Center)
                            .Color("white");
                    cells.Add()
                            .Bold(true)
                            .Background("#015991")
                            .TextAlign(SpreadsheetTextAlign.Center)
                            .Color("white");
                    cells.Add()
                            .Bold(true)
                            .Background("#015991")
                            .TextAlign(SpreadsheetTextAlign.Center)
                            .Color("white");
                    cells.Add()
                            .Bold(true)
                            .Background("#015991")
                            .TextAlign(SpreadsheetTextAlign.Center)
                            .Color("white");
                    cells.Add()
                            .Bold(true)
                            .Background("#015991")
                            .TextAlign(SpreadsheetTextAlign.Center)
                            .Color("white");
                    cells.Add()
                            .Bold(true)
                            .Background("#015991")
                            .TextAlign(SpreadsheetTextAlign.Center)
                            .Color("white");
                    cells.Add()
                            .Bold(true)
                            .Background("#015991")
                            .TextAlign(SpreadsheetTextAlign.Center)
                            .Color("white");
                    cells.Add()
                            .Bold(true)
                            .Background("#015991")
                            .TextAlign(SpreadsheetTextAlign.Center)
                            .Color("white");
                    cells.Add()
                            .Bold(true)
                            .Background("#015991")
                            .TextAlign(SpreadsheetTextAlign.Center)
                            .Color("white");
                });
            });
        })
    
)

<script>

function onRead(options) {
            var data = [
                {
                    Section: '',
                    Page: '',
                    Line: '',
                    Item: '',
                    Category: '',
                    Email: '',
                    Subject: '',
                    Comment: '',
                    ProposedSolution: ''
                }
            ]
            options.success(data);
        }
        function onSubmit(e) {
           //No rows included in created or updated
           console.log(e.data);
            
        }
</script>

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 13 Jul 2021, 07:47 AM

Hello Carlos,

Thank you for reporting this behavior. It is a known issue in version 2021.1.224. Fortunately, it has been fixed in R2 2021, so we would recommend upgrading: https://www.telerik.com/support/whats-new/aspnet-mvc/release-history/ui-for-asp-net-mvc-r2-2021

I've attached a video showing the Spreadsheet behavior in the demos, which use the latest official version. The values from the pasted rows are submitted as expected.

Regards,
Ivan Danchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Asked by
Carlos
Top achievements
Rank 1
Veteran
Answers by
Ivan Danchev
Telerik team
Share this question
or