简体   繁体   中英

.NET MVC 4 Kendo UI Grid and file upload

Is there a possibility to do smoething like this:

  1. I have a window with KendoGrid. DataSource is binded to model which contains a list of AttachmentDetails: FileName, Content, Description, etc.
  2. I have a button on top of the form to "Save" the modified/added/deleted list to database.
  3. I have a button to "Add" new Attachement. This opens a new window via javascript open.window.
  4. On that window I have a form with fields for model AttachmentDetails with input type "file" to get the Contents.
  5. When I click "Save" on that new window It should close itself, and add new item to Grid on the parent window.

How can I do this kind of usabillity with Kendo? Should I use Session to store the list with Content?

So you want when you are done uploading the file to refresh the Grid and display that new records? If that's the case you should use the dataSource.read() method to refresh the Grid when the success callback of the uploading is called.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM