delete unused file inputs when using startUpload

7 posts, 0 answers
  1. moegal
    moegal avatar
    273 posts
    Member since:
    Jul 2007

    Posted 30 Jan 2013 Link to this post

    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
  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 04 Feb 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. moegal
    moegal avatar
    273 posts
    Member since:
    Jul 2007

    Posted 04 Feb 2013 Link to this post

    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




  5. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 07 Feb 2013 Link to this post

    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.
  6. moegal
    moegal avatar
    273 posts
    Member since:
    Jul 2007

    Posted 07 Feb 2013 Link to this post

    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

  7. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 12 Feb 2013 Link to this post

    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.
  8. moegal
    moegal avatar
    273 posts
    Member since:
    Jul 2007

    Posted 12 Feb 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017