Waiting for JQuery .Click() to update Page for further page processing
<p>I have a situation where I call the Refresh button of my page to update the RadGrid data from Server. When user edits the data and saves it, to update the data on screen I call the click event of button using JQuery</p>

<p>$find(ButtonRefreshID).click();</p>

<p>The problem with this is that when this partial page update is completed it hides the Notification / error messages, since the server side code of this event handler hides them explicitly.</p>

<p>I am trying to show the notification to user by setting their display porporty to block after the call to click event. However the partial page update is completed after the other two statements have been executed and again hides the Notification</p>

<pre><code>$find(ButtonRefreshID).click();
document.getElementById('&lt;%= lblNotification.ClientID %&gt;').innerText = 'Data saved';
document.getElementById('&lt;%= lblNotification.ClientID %&gt;').style.display = 'block';
</code></pre>

<p>I tried using the call back functions also but that did not help either.</p>

<pre><code>        function refreshData(callBackfunction) {
            $find(ButtonRefreshID).click();
            callBackfunction();
        }

        function UpdateStatusCallBack() {
            document.getElementById('&lt;%= lblNotification.ClientID %&gt;').innerText = 'Data saved ';
            document.getElementById('&lt;%= lblNotification.ClientID %&gt;').style.display = 'block';
        }

       refreshSplitData(UpdateStatusCallBack);
</code></pre>

<p>Please suggest a way to get this working.</p>
