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

Stopping upload within grid

2 Answers 55 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
golddog
Top achievements
Rank 1
golddog asked on 14 Nov 2011, 10:19 PM
Hey guys, I was trying this approach, but couldn't get it to work.  My situation is different because my RadUpload is within the EditItemTemplate of a RadGrid's column.  Also, my grid is within a user control which does an ajax postback, so the user sees a loading panel while the document is being uploaded. I don't think that has anything to do with it, but it is a difference from the example.

What we're doing is listing all the documents attached to this person.  If they hit the "Add new record" button, one of the elements of my edit item is a RadUpload.  It seems to work very well, except when a very large document is attempted.  Then, after about 2 minutes, I get an HttpException that the max request length has been exceeded.

I am setting RadUpload's MaxFileSize to a configured value.  Currently, it's 1000 *1024 (1MB).  The file I'm testing with is 11,184 KB, but RadUpload fails to stop it there.

I found the link above.  Tried adding a RadProgressManager and RadProgressArea to my EditItemTemplate and throwing the javascript in my control to no avail.  The javascript is never getting invoked.  The example isn't clear as to how the RadProgress controls are tied to the RadUpload control.

Any ideas?

Thanks,

Scott

2 Answers, 1 is accepted

Sort by
0
Accepted
Bozhidar
Telerik team
answered on 16 Nov 2011, 10:39 AM
Hello Golddog,

Although the workaround we provided works, it's very error prone. I would suggest that you use the RadAsyncUpload instead of the RadUpload. It allows to check the file size on the client. For more information on the RadAsyncUpload you can check the documentation. Feel free to contact us if you need more help.

Regards,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
golddog
Top achievements
Rank 1
answered on 28 Nov 2011, 11:54 PM
Thanks Bozhidar, that example pointed me in the right direction where I could tweak it to work for in-line uploading of documents to my grid.
Tags
Upload (Obsolete)
Asked by
golddog
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
golddog
Top achievements
Rank 1
Share this question
or