Thursday, October 27, 2016

Document dot ready function not working in UpdatePanel

 Document dot ready function not working in UpdatePanel

 $(document).ready(function () {

});
instead of  $(document).ready use below..


var prm = Sys.WebForms.PageRequestManager.getInstance();
    if (prm != null) {
        prm.add_endRequest(function (sender, e) {
            if (sender._postBackSettings.panelsToUpdate != null) {               
                document.getElementById("SearchBox").style.display = 'none';

                openFileInGrid();
            }
        });

    };

No comments:

Post a Comment