upload file to grid

4 posts, 0 answers
  1. George
    George avatar
    18 posts
    Member since:
    Jul 2019

    Posted 07 Jan 2020 Link to this post

    Is it possible to upload a file and have the content of the file be shown in the grid? The file will have 3 columns and will never change, I want to upload this file and have the columns in the file to be shown in the grid to the user.
  2. Petar
    Admin
    Petar avatar
    437 posts

    Posted 09 Jan 2020 Link to this post

    Hi George,

    Here is a demo that demonstrates how we can select and image for upload and generate its thumbnail before uploading it. The demonstrated approach could be used as a basis for implementing the functionality you want to achieve - you have to extract the needed data from the selected file, add it to a Datasource that could be read by the Grid and load this datasource to display the extracted data.  

    Regards,
    Petar
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. George
    George avatar
    18 posts
    Member since:
    Jul 2019

    Posted 09 Jan 2020 in reply to Petar Link to this post

    That's not really what I'm looking for. I want to upload a file (csv or xls) and show the content in the grid, allow the user to make changes to the data in the grid, then do a bulk update to my database table. 
  4. Petar
    Admin
    Petar avatar
    437 posts

    Posted 13 Jan 2020 Link to this post

    Hi George,

    The described scenario can be achieved using the Spreadsheet component of the Kendo UI suite. Here is an example that demonstrates similar scenario to the one described in your last reply. The example demonstrates how we can upload a CSV/Excel file. The file is sent to the server and then opened in the Spreadsheet component.

    This Spreadsheet / DataSource binding demo demonstrates how we can load file from the server, edit it and save the changes. 

    You can combine the above two demos and achieve the desired scenario. Depending on the backend used in the application, you can read the uploaded and edited file and save its data in a database. 

    Regards,
    Petar
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top