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

RadAsyncUpload Demo Issues

3 Answers 105 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 27 Jun 2012, 02:06 PM
This demo: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandradasyncupload/defaultcs.aspx?product=upload 
Has the following
<telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" OnClientFileUploaded="OnClientFileUploaded"
                               AllowedFileExtensions="jpg,jpeg,png,gif"
                               MaxFileSize="1048576" OnValidatingFile="RadAsyncUpload1_ValidatingFile">
</telerik:RadAsyncUpload>

.... yet RadAsyncUpload does not contain an OnValidatingFile event. Theres code written to it in the code-behind as well.

This demo here:
http://www.telerik.com/help/aspnet-ajax/grid-binaryimage-radasyncupload.html 

Has the same flaw but actually writes logic tied to it ( See: IsRadAsyncValid ). Also, a CustomValidator is dynamically created during ItemCreated when the AsyncUpload itself is simply sitting in an EditItemTemplate of a TemplateColumn. The Custom Validator does not need to be dynamic.

When you guys get some time, can you unify your demo's and come up with some best practices for RadAsyncUpload when used inside of a grid?

For now, here's what I take away from it:
  • Keep a Custom Validator with client side validation tied to the RadAsyncUploadControl to prevent the page from submitting until any current upload operations are finished
  • If you are in an ajax grid, you may as well enable onFileUploaded to .ajaxRequest() and clear ( radAsyncUpload.deleteFileinputAt(0) ) the 'queue'.
  • During Insert/Update get a reference to the async upload and check for UploadedFiles.

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 02 Jul 2012, 11:12 AM
Hello Jonathan,

 
Thank you for sharing you recommendations and for your concern with RadControls.

It seems that the OnValidatingFile is no more used in RadAsyncUpload and is used in the on-line demo by mistake instead of OnFileUploaded method. Please excuse us for this mistake and for the inconvenience caused by this issue. We will make our best to update the demo considering your other recommendations as well before the up coming Service pack of our product.

If you have other ideas or questions concerning this issue please let us know.

Kind regards,
Plamen Zdravkov
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
Benjamin
Top achievements
Rank 1
answered on 30 Jan 2014, 05:45 PM
It's been a year and a half and your demos have still not been updated. Thanks for wasting half a day of my time!
0
Plamen
Telerik team
answered on 04 Feb 2014, 01:43 PM
Hello Benjamin,

Thank you for reminding us for this issue and  please excuse us once again for the inconvenience caused.

The demo is already updated and it will go live on the next upload of the Demo site. 

Regards,
Plamen
Telerik
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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
AsyncUpload
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Benjamin
Top achievements
Rank 1
Share this question
or