Refresh radgrid once changes are made to the database?
<p>I have a page which contains a radgrid. The grid contains data retrieved from a database. It also contains an add record button that will open a new tab for the user to fill in the details for a new record. After adding the record, the user will close the opened tab. </p>

<p>The new record added is not displayed in the grid until the user refreshes the page. Is there any way to refresh/rebind the data in the grid when the user closes the add record tab or if the user switches back to the tab with the grid? Or is there a way to update data in the grid once any changes to the database is made even if it is not the active tab(refresh in background)?</p>

<p>I tried to use the function but it doesn't seem to work. Any idea why?</p>

<pre><code> $(window).focus(RefreshGrid());
        function RefreshGrid() {
            var masterTable = $find("&lt;%= rgQualifiedLeads.ClientID %&gt;").get_masterTableView();
            masterTable.rebind();
        }
</code></pre>