Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

2016 Q1 Breaks Sys.Application.remove_load

$
0
0

In order to make my pages containing RadGrids more responsive, I load the page with no data and then retrieve the data in a postback.

This worked great until I tried running it with the latest Telerik UI controls (2016 Q1). Now, the remove_load does not seem to work, so the data is continually reloaded.

Any ideas?

The code on my aspx page is as follows:

<script type="text/javascript">
    functionrebindGrid(clientid) {
        vargrid = $find(clientid);
        if(grid == null)
            return;
        if(typeof(grid.get_masterTableView) != "function")
            return;
        varmasterTable = grid.get_masterTableView();
        if(masterTable != null)
            masterTable.rebind();
    }
 
    functionrebindPageGrid() {
        Sys.Application.remove_load(rebindPageGrid);
        rebindGrid("<%= AccountGrid.ClientID %>");
    }
 
    Sys.Application.add_load(rebindPageGrid);
</script>

The code behind looks like:

protectedvoidOnAccountGridNeedDataSource(objectsource, GridNeedDataSourceEventArgs e)
{
    if(Page.IsPostBack)
    {
        AccountGrid.DataSource = GetAccountList();
        AccountGrid.MasterTableView.NoMasterRecordsText = "No records to display";
    }
    else
    {
        AccountGrid.DataSource = newList<Account>();
        AccountGrid.MasterTableView.NoMasterRecordsText = "Loading Data...";
    }
}

 


Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>