Question re: data transfer

3 posts, 1 answers
  1. Mark Galbreath
    Mark Galbreath avatar
    171 posts
    Member since:
    Jul 2009

    Posted 17 Feb 2010 Link to this post

    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:
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="block" /> 
    <telerik:RadGrid ID="radGrid1" runat="server">  
            <telerik:GridHyperLinkColumn DataTextField = "LIN" HeaderText = "LIN" DataNavigateUrlFields = "LIN" UniqueName = "lin"></telerik:GridHyperLinkColumn> 
        * * *  

    Relevant Codebehind:
    Protected Sub radGrid1_Load( sender As Object, e As EventArgs) Handles radGrid1.Load  
            If Application( "lins" ) Is Nothing Then  
                Application( "lins" ) = dao_LIN.Get_LINs()  
            End If  
            radGrid1.DataSource = DirectCast( Application( "lins" ), DataSet )  
        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?

  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 18 Feb 2010 Link to this post

    Hi Mark,

    Telerik RadGrid supports Custom Paging technique which allows you to fetch only a fixed number of records and perform operations over this specified set of data.

    Hope this helps.

  3. Mark Galbreath
    Mark Galbreath avatar
    171 posts
    Member since:
    Jul 2009

    Posted 19 Feb 2010 Link to this post

    Thanks, Princy!  I've been wondering what the AllowCustomPaging switch is for.

Back to Top