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

delete unused file inputs when using startUpload

6 Answers 93 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
moegal
Top achievements
Rank 1
moegal asked on 31 Jan 2013, 02:09 AM
Hi,

I want to Remove the remaining file inputs when a user starts the upload using a button tied to startUpload.

Is there a way to detect which inputs do not have any files?

Thanks, Marty

6 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 04 Feb 2013, 04:24 PM
Hello,

Can you please clarify the scenario that you have and what you are trying to achieve? I am not quite sure that I understand what you are referring to by "the remaining file inputs", can you also clarify that too?

Greetings,
Kate
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
moegal
Top achievements
Rank 1
answered on 04 Feb 2013, 07:27 PM
I am using async upload and I want to control the number of files. I have the control set to ManualUpload="true" 

Once I click the "Upload" button I want to prevent the user from adding any additional files.  Ideally I would remove any remaining file inputs.

I have uploaded in image to demonstrate.

Regardless of how many files I have chosen I want to remove any unused file inputs once the Upload button has been clicked.


Thanks,

Marty




0
Kate
Telerik team
answered on 07 Feb 2013, 02:14 PM
Hello Moegal,

You can use the MaxFileInputsCount property of the RadAsyncUpload control and thus you can control the number of files that can be uploaded.

All the best,
Kate
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
moegal
Top achievements
Rank 1
answered on 07 Feb 2013, 02:36 PM
Kate,

thanks, but that is not what I need.  I want there to always be a new file input available as I select my files, but once I click the upload button, I want to remove any unused file inputs. I still want to display the upload progress so I do not want to hide the entire control until all of the files have been uploaded.

Sorry if I was not clear.

Marty

0
Kate
Telerik team
answered on 12 Feb 2013, 01:22 PM
Hi Marty,

You can hide the Select/Browse button using some css styles, for example on clicking of a button you can set a css class that will hide the button after postback. Here is the code that I used for testing purpose:
<style>
       .new .ruBrowse {
           display: none;
       }
   </style>

javascript:
<script>
                function OnClientClicking(sender, args) {
                    $telerik.$(".ruBrowse").css('display', 'none');
                }
 
            </script>

markup:
<telerik:RadAsyncUpload runat="server" ID="radasyncupload1" ManualUpload="true">
          </telerik:RadAsyncUpload>
          <telerik:RadButton runat="server" ID="button1" Text="upload" OnClientClicking="OnClientClicking" OnClick="button1_Click"></telerik:RadButton>

code behind:
protected void button1_Click(object sender, EventArgs e)
   {
     radasyncupload1.CssClass= "new";
 
   }


Regards,
Kate
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
moegal
Top achievements
Rank 1
answered on 12 Feb 2013, 09:54 PM
i will give it a try, for now i have hiding the entire thing and using the radprogress

I will let you know how it works out.
Tags
AsyncUpload
Asked by
moegal
Top achievements
Rank 1
Answers by
Kate
Telerik team
moegal
Top achievements
Rank 1
Share this question
or