Is it possible to paste data from Excel and have the create method fire to append each inserted row?
The example from the documentation (http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/excel/copy-from-excel-to-grid) simply replaces the existing grid's datasource whereas I would like to append each row that is pasted in so that it maintains the existing data and adds the newly pasted data.
My example Grid currently looks like:
@(Html.Kendo().Grid<InvoiceDetailVM>()
.Name("MyGrid")
.Columns(columns =>
{
columns.Bound(p => p.ID).Hidden();
columns.Bound(p => p.Description);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(250);
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Sortable()
.DataSource(dataSource => dataSource // Configure the grid data source
.Ajax()
.PageSize(25)
.Events(events => events.Error("window.KendoGrid_Error"))
.Model(model =>
{
model.Id(i => i.ID); // Specify the property which is the unique identifier of the model.
model.Field(i => i.ID).Editable(false);
})
.Create(update => update.Action("Create", "Test"))
.Read(read => read.Action("Read", "Test"))
.Update(update => update.Action("Edit"))
.Destroy(update => update.Action("Delete", "Test"))
)
)
Any help would be appreciated.
Thanks!