PostbackTriggers not working if the click event was triggered programmatically using JQuery trigger() or click() methods

3 posts, 0 answers
  1. Omar
    Omar avatar
    16 posts
    Member since:
    Jul 2013

    Posted 21 Apr 2015 Link to this post

    I have RadAsyncUpload control defined as following:

    the PostbackTriggers property works fine if I have clicked the button "btnSave",  but in some case I need to simulate the button click automatically, 

    None of the following javascript or JQuery methods solved my problem , they fire the click event but the files collections is always empty

    function SaveMeeting() {
               document.getElementById('ctl00_PageBody_btnSave').onclick();
               //$('.btnSave').focus();
               //$('.btnSave').click();
               //$('.btnSave').trigger('click');
           }

    <telerik:RadAsyncUpload Font-Size="Medium" ID="RadAsyncUpload1" runat="server" OnClientFilesUploaded="OnClientFilesUploaded" OnClientFileUploaded="onClientFileUploaded" OnClientFileUploading="OnClientFileUploading OnClientFileUploadFailed="OnClientFileUploadFailed" OnClientFileUploadRemoving="onClientFileUploadRemoving OnClientFileUploadRemoved="onClientFileUploadRemoved"MultipleFileSelection="Automatic" PostbackTriggers="btnSave" HttpHandlerUrl="~/UploadDocFileHandler.ashx"
     Height="16px"></telerik:RadAsyncUpload>     

  2. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 24 Apr 2015 Link to this post

    Hello Omar,

    I have performed some local tests using the jQuery click method on the bntSave and it seems that the correct behavior is achieved. I am sending you the sample project that I have tested with. You can give it a try at your end and check how it differs from your implementation.

    Regards,
    Nencho
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Omar
    Omar avatar
    16 posts
    Member since:
    Jul 2013

    Posted 07 Jun 2015 Link to this post

    Thanks Nencho,

                It is working now (sure since two month and sorry for the late feedback)

Back to Top