I have a Spreadsheet which already Bind to an object (see below code). I want to open a file (import) and Bind it with my existing binding.
@(Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Sheetsbar(false)
.Toolbar(x => x.Data(false).Insert(false))
.HtmlAttributes(new { style = "width:100%;" })
.Rows(5000)
.Events(e => e.ExcelImport("ImportProduct"))
.Sheets(sheets =>
{
sheets.Add()
.Name("Product")
.DataSource<MyCompany.DTO.Logistics.Planning.ProductSearchResultDTO>(ds => ds
.Ajax()
.Batch(true)
.Read(r => r.Action("ProductBulkSearchResults", "Logistics").Data("getCriteria"))
.Update(u => u.Action("ProductBulkUpdate", "Logistics").Data("getCriteria"))
.Events(e => e.Change("onChange"))
.Model(m =>
{
m.Id(p => new { p.ProductID, p.ORGID });
})
)
.Columns(columns =>
{
columns.Add().Width(100);
columns.Add().Width(415);
columns.Add().Width(0);
columns.Add().Width(0);
columns.Add().Width(145);
})
;
})
)