I have a paginated radgrid that connects to a table with 23k records, of which I have 500 records displayed per page. Now, it takes a long time to get this first display, as I would expect for such a large DataSet. The problem is that it takes just as long to display another page of the radgrid, like it is going back to the database, refilling the DataSet, and then paging the data into the new display.
I am using the object source design pattern (simplified MVC), where (1) view (ASPX) requests data -> (2) controller (ASP .NET) invokes data access object -> (3) DAO queries database and stores DataSet as model in Application scope if it is not already present -> (4) controller delivers requested data to view
When radgrid needs another page of data, isn't that data readily available in the DataSet? Is the entire DataSet sent to the client (which is what I want) for quicker page transitions?
Relevant ASPX:
Relevant Codebehind:
The DAO (without exception code):
Seems pretty straight-forward to me. What am I missing so that I can get the pagination on the client to be very fast?
Cheers!
Mark
I am using the object source design pattern (simplified MVC), where (1) view (ASPX) requests data -> (2) controller (ASP .NET) invokes data access object -> (3) DAO queries database and stores DataSet as model in Application scope if it is not already present -> (4) controller delivers requested data to view
When radgrid needs another page of data, isn't that data readily available in the DataSet? Is the entire DataSet sent to the client (which is what I want) for quicker page transitions?
Relevant ASPX:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="RadGrid1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="block" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
<telerik:RadGrid ID="radGrid1" runat="server"> |
<MasterTableView> |
<Columns> |
<telerik:GridHyperLinkColumn DataTextField = "LIN" HeaderText = "LIN" DataNavigateUrlFields = "LIN" UniqueName = "lin"></telerik:GridHyperLinkColumn> |
* * * |
</Columns> |
</MasterTableView> |
</Telerik:RadGrid> |
Relevant Codebehind:
Protected Sub radGrid1_Load( sender As Object, e As EventArgs) Handles radGrid1.Load |
Try |
If Application( "lins" ) Is Nothing Then |
Application( "lins" ) = dao_LIN.Get_LINs() |
End If |
radGrid1.DataSource = DirectCast( Application( "lins" ), DataSet ) |
radGrid1.DataBind() |
Catch ex As HttpException |
RadAjaxManager1.Alert( "Communication with the database failed: " & ex.Message()) |
Response.Redirect( "/Lexis/Lexis_error.aspx?module=rcm" ) |
End Try |
End Sub |
The DAO (without exception code):
<DataObject( True )> _ |
Public Class dao_LIN |
<DataObjectMethod( DataObjectMethodType.Fill )> _ |
Public Shared Function Get_LINs() As DataSet |
Dim ds As DataSet = New DataSet() |
Dim cmd As OracleCommand = New OracleCommand( "select * from VW_LIN_REF_WITH_COSTS order by LIN", dao_Conn.Instance( "OracleConnectionString" )) |
Dim da As OracleDataAdapter = New OracleDataAdapter( cmd ) |
da.Fill( ds ) |
Return ds |
End Function |
Seems pretty straight-forward to me. What am I missing so that I can get the pagination on the client to be very fast?
Cheers!
Mark