Bind Spreadsheet with imported excel

2 posts, 0 answers
  1. Omar
    Omar avatar
    3 posts
    Member since:
    Sep 2016

    Posted 29 Sep Link to this post

    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.

    .Toolbar(x => x.Data(false).Insert(false))
    .HtmlAttributes(new { style = "width:100%;" })
    .Events(e => e.ExcelImport("ImportProduct"))
    .Sheets(sheets =>
    .DataSource<MyCompany.DTO.Logistics.Planning.ProductSearchResultDTO>(ds => ds
    .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 =>

  2. Ivan Danchev
    Ivan Danchev avatar
    788 posts

    Posted 03 Oct Link to this post

    Hello Omar,

    A file can be imported in the Spreadsheet through the fromJSON method, which you can see in action in the following demo. As you can see in the Upload's success handler:
    success: function (e) {
                    // Load the converted document into the spreadsheet

    the data is loaded from the response and it does not use the existing binding. Calling this method simple removes all the existing data and loads the one saved in the response. So binding the Spreadsheet to an object and importing a file are two different approaches of loading data.

    Ivan Danchev
    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 AJAX bannerTelerik UI for ASP.NET Core is out
Back to Top