[CLOSED] Paging Issue

  1. #1

    [CLOSED] Paging Issue

    Hi,

    I am not yet upgraded to Ext.Net2.0. I am posted this issue in 2.x Premium Help.
    Paging Issue.

    Actually we have already developed one approach to get Data as in following code. While adding records to datatable we will verify some conditions and then modify that record to show properly GUI. Example if column value 2 it should show as II, or ii or two. This is just an example, in this way I have to modify the data in each column and then add to data column to show in the grid.

    Please help me out how can I implement the paging to show first set (page size) of records quickly.

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="ExtPagingCheck.aspx.vb"
        Inherits="Testing_ExtPagingCheck" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Store ID="Store1" runat="server">
            <Reader>
                <ext:JsonReader IDProperty="RECORD_ID">
                    <Fields>
                        <ext:RecordField Name="RECORD_ID" />
                        <ext:RecordField Name="NAME" />
                        <ext:RecordField Name="Value1" />
                        <ext:RecordField Name="Value2" />
                        <ext:RecordField Name="PresentDate" />
                    </Fields>
                </ext:JsonReader>
            </Reader>
            <AutoLoadParams>
                <ext:Parameter Name="start" Value="0" Mode="Raw" />
                <ext:Parameter Name="limit" Value="25" Mode="Raw" />
            </AutoLoadParams>
        </ext:Store>
        <ext:Viewport ID="vpSearchDocuments" runat="server" Layout="border">
            <Items>
                <ext:GridPanel ID="gvReg" runat="server" StoreID="Store1" AnchorHorizontal="100%"
                    Region="Center" Title="Search Results" AutoExpandColumn="NAME" MaskDisabled="false"
                    StripeRows="true" Cls="horizontal-scrolling-fix">
                    <ColumnModel ID="ColumnModel1" runat="server">
                        <Columns>
                            <ext:Column Header="App ID" DataIndex="RECORD_ID" Width="80">
                            </ext:Column>
                            <ext:Column Header="BorrowerType" DataIndex="NAME" />
                            <ext:Column Header="Condition Name" DataIndex="Value1" />
                            <ext:Column Header="Condition Info" DataIndex="Value2" />
                            <ext:Column Header="Uploaded Date" DataIndex="PresentDate" />
                        </Columns>
                    </ColumnModel>
                    <SelectionModel>
                        <ext:CheckboxSelectionModel ID="CheckboxSelectionModel1" runat="server" />
                    </SelectionModel>
                    <LoadMask ShowMask="true" />
                    <BottomBar>
                        <ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="25">
                            <Items>
                                <ext:Label ID="Label1" runat="server" Text="Page size:" />
                                <ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />
                                <ext:ComboBox ID="ComboBox1" runat="server" Width="80">
                                    <Items>
                                        <ext:ListItem Text="5" />
                                        <ext:ListItem Text="10" />
                                        <ext:ListItem Text="25" />
                                        <ext:ListItem Text="50" />
                                        <ext:ListItem Text="100" />
                                        <ext:ListItem Text="250" />
                                    </Items>
                                    <SelectedItem Value="25" />
                                    <Listeners>
                                        <Select Handler="#{PagingToolbar1}.pageSize = parseInt(this.getValue()); #{PagingToolbar1}.doLoad();" />
                                    </Listeners>
                                </ext:ComboBox>
                            </Items>
                        </ext:PagingToolbar>
                    </BottomBar>
                </ext:GridPanel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
    Code behind...
    Imports Ext.Net
    
    Partial Class Testing_ExtPagingCheck
        Inherits System.Web.UI.Page
    
        Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
    
            If Not Ext.Net.X.IsAjaxRequest Then
                Call LoadDataInfo()
            End If
    
        End Sub
    
        Public Sub LoadDataInfo()
    
            Store1.DataSource = GetDataSourceInfo()
            Store1.DataBind()
    
        End Sub
    
        Public Function GetDataSourceInfo() As DataTable
            Dim dt As New DataTable
            Dim dr As DataRow
            Dim i As Integer
            Dim rnd As New Random
    
    
            dt.Columns.Add("RECORD_ID")
            dt.Columns.Add("NAME")
            dt.Columns.Add("Value1")
            dt.Columns.Add("Value2")
            dt.Columns.Add("PresentDate")
    
            For i = 0 To 60000
                dr = dt.NewRow()
    
                dr(0) = i + 1
                dr(1) = "Name " & i
                dr(2) = "Random Info " & rnd.Next(1, 20000)
                dr(3) = "Random Info " & rnd.Next(20000, 40000)
                dr(4) = System.DateTime.Now.Ticks()
    
                dt.Rows.Add(dr)
            Next
    
            Return dt
        End Function
    End Class
    Last edited by Daniil; Sep 25, 2012 at 6:46 AM. Reason: [CLOSED]
  2. #2
    Our current page with this grid loads very slow when we have more than a few hundred records. We are defaulting the record count for each page to 50. Even if we decrease the page count to 25 it is still very slow. We are trying to load the default page count quickly, and only load the other pages on demand.
  3. #3
    60000 records is too heavy for browser. The single way to inprove the performance to use remote paging instead local
    https://examples1.ext.net/#/GridPane..._Sorting/Page/

Similar Threads

  1. Grid Paging issue
    By pooja in forum 1.x Help
    Replies: 3
    Last Post: Jan 05, 2012, 10:34 AM
  2. Paging Issue
    By wdk in forum 1.x Help
    Replies: 2
    Last Post: Mar 25, 2011, 3:46 AM
  3. [CLOSED] GridPanel remote paging issue
    By jskibo in forum 1.x Legacy Premium Help
    Replies: 15
    Last Post: Jan 31, 2011, 8:37 AM
  4. [CLOSED] [1.0] Issue maintain selections through paging
    By edigital in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Aug 30, 2010, 8:34 PM
  5. [CLOSED] [1.0] Issue with paging on grid load.
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 02, 2010, 5:04 PM

Tags for this Thread

Posting Permissions