I am using ASP.NET MVC4 and 2013 vol1 with VS 2012.
Martin from Infragistics was kind enough to give me a solution on how to add an upload control to a grid column.https://www.infragistics.com/community/forums/f/ignite-ui-for-javascript/80549/adding-an-upload-control-into-a-grid-template-column
ISSUE #1
I managed to get the upload working, yet one thing I discovered was that the script required by the uploader actually prevents the grid from doing any paging or filtering. Even though the script for uploading works. No client-side error is thrown in IE and I can't seem to figure out the problem.I have marked the script in the code that is the problem.ISSUE #2After making an edit to a row, the fileupload template column disappears. I'm not sure if this issue is related, but how do I prevent the fileupload template column from going away?
Here is a link to the solution with the grid problem.http://www.meltdown.co.za/upload/upload.zip
Thanks
Hello Greg,
Thank you for the sample attached.
We will test it on our side and update you with our findings regarding both mentioned issues.
This behavior appears to be caused by the known grid limitation when unbound columns are used. Basically the unbound values are not maintained when the grid is rebind due to CRUD operations, Paging or Sorting - http://help.infragistics.com/Help/Doc/jQuery/2013.1/CLR4.0/html/igGrid_UnboundColumns_Known_Issues.html#_Updating_and_unbound
As a workaround setting the content on “dataBound” event is proposed.
Check this option and update me with the results.
Hi Alex,
Setting the column to bound resolves the issue regarding the row value being correctly updated.
So now all columns in my grid are bound, yet the paging/filtering is still affected by the script of the upload control?
First, the problem is not in the unbound column. The Known Issue is about unbound column value, so this doesn't affect you.
Now, let's get back to your issues:
ISSUE #1 is caused by instantiating the igLoader too many times.
ISSUE #2 is a consequence of how to grid control operates. Currently you're instantiating igUpload controls only at grid initialization time, but while the user operates with the grid, for example changing current page the grid has to delete the previous data and render new one. The sample is with updating. Adding or editing a row will cause the grid to render that row. That's why you need to instantiate the igUpload control each time the grid re-renders its data.
I've modified the Index.cshtml file in order to fix those issues. You can find it attached to this forum post.
Note: The igUpload controls which are created are automatically deleted when the grid rows are re-rendered, so you don't have to worry about that.
Hope this helps,Martin PavlovInfragistics, Inc.