This is a migrated thread and some comments may be shown as answers.

[Solved] Refresh grid after upload

1 Answer 177 Views
Upload
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jfkrueger
Top achievements
Rank 1
jfkrueger asked on 12 Jun 2012, 09:46 PM
When I upload a file, I need a grid to refresh showing the newly added file. I can't get it to work by returning a view from my SaveFile method because if I try and return a view I get an error stating that the view cannot be found. I also need to add a value to the RouteValues so that the action that refreshes the grid will work.

Anyone??

1 Answer, 1 is accepted

Sort by
0
jfkrueger
Top achievements
Rank 1
answered on 12 Jun 2012, 10:10 PM
Once again found it shortly after posting:

Here is the answer:

function onImageUploadComplete(e) {
    e.data = { inventoryItemId: key };
    var grid = $('#GridImages').data('tGrid');
 
    grid.rebind();
}






Tags
Upload
Asked by
jfkrueger
Top achievements
Rank 1
Answers by
jfkrueger
Top achievements
Rank 1
Share this question
or