RadAsyncUpload and CustomValidator

4 posts, 0 answers
  1. Mark
    Mark avatar
    9 posts
    Member since:
    Feb 2012

    Posted 27 Mar 2013 Link to this post

    I am trying to get the CustomValidator to work with the RadAsyncUpload, but not having any luck.

    I have tried the example from here http://www.telerik.com/community/forums/aspnet-ajax/async-upload/required-validator-and-radasyncupload.aspx but the javascript never fires. What links the 2 controls togther? Normally I would set the ControlToValidate property of the CustomValidator, but that also does not work.

    I have simplified the example (Should always fail validataion), but still no luck

       <script type="text/javascript">
          function validateUpload(sender, args) {
                args.IsValid = false;
            }
       </script>
     
     <div>
         <tel:RadAsyncUpload ID="RadAsyncUpload1" runat="server" MultipleFileSelection="Automatic" />
          <asp:CustomValidator runat="server" ID="CustomValidator" ClientValidationFunction="validateUpload" ErrorMessage="Select at least a single file" />
    </div>

  2. Mark
    Mark avatar
    9 posts
    Member since:
    Feb 2012

    Posted 27 Mar 2013 Link to this post

    Bit of an update..

    If I add a textbox onto the page with validation, the RadSyncUpload validation will trigger when the textbox is updated and its seperate validation is triggered 
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mark
    Mark avatar
    9 posts
    Member since:
    Feb 2012

    Posted 27 Mar 2013 Link to this post

    Fixed, I just call Page_ClientValidate('MyGroup') on FileUploaded
  5. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 28 Mar 2013 Link to this post

    Hi Mark,

    Thank you for sharing this with the community. 

    Regards,
    Hristo Valyavicharski
    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.
Back to Top