Hello,
I'm trying to make use of the NeedDataSource event in order to bind the grid to a datasource that may cause a page timeout. The data collection process is pretty hefty, and I need to be able to load everything on the page without having to wait for the grid to collect its data. The html looks like this:
And in the Need Data Source:
SetData() is where the data collection occurs, and sometimes causes a page timeout. Please let me know what I'm missing.
I'm trying to make use of the NeedDataSource event in order to bind the grid to a datasource that may cause a page timeout. The data collection process is pretty hefty, and I need to be able to load everything on the page without having to wait for the grid to collect its data. The html looks like this:
<
telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" >
<
asp:Image id="imgLoading" runat="server" ></asp:Image>
</
telerik:RadAjaxLoadingPanel>
<
telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
< telerik:RadGrid ID="CWGrid" runat="server" Width="100%" OnNeedDataSource="CWGrid_NeedDataSource" >
</
telerik:RadGrid>
</
telerik:RadAjaxPanel>
And in the Need Data Source:
public
void CWGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
DataSet objSD = SetData();
if (objDS.Tables.Count > 0)
CWGrid.DataSource = objDS;
}
SetData() is where the data collection occurs, and sometimes causes a page timeout. Please let me know what I'm missing.