[CLOSED] How to make the grid to show the number of records that I want according to the pagination?

  1. #1

    [CLOSED] How to make the grid to show the number of records that I want according to the pagination?



    Hi,

    I am using a PagingToolBar control to show just 10 records per page.


    My problem is that when the page is loaded for the first time it shows all the records instead of 10 and when I click the page control to go to the next page it shows me 10 records per page which is right.


    Could you tell me please how can I make the grid to show just 10 records when it is loaded?





    
    <ext:Panel ID="Panel2" runat="server" Title="Champ Academy" Height="350px" Width="670px">
    
    
    <Content> 
    
    
    <ext:GridPanel ID="GridPanelUserPortalQuiz" runat="server" Height="332px" Width="670px" Title="Title" 
    
    
    StoreID="StoreUserPortalQuiz">
    
    
    <ColumnModel ID="ColumnModelGridPanelUserPortalQuiz">
    
    
    <Columns>
    
    
    <ext:Column ColumnID="PORTALIDcolumn" 
    
    
    DataIndex="PORTALID" 
    
    
    Hidden="true"
    
    
    >
    
    
    </ext:Column>
    
    
    <ext:Column ColumnID="PORTALTITLEColumn" 
    
    
    DataIndex="PORTALTITLE" 
    
    
    Header="Portal Title"
    
    
    Width="240px">
    
    
    </ext:Column> 
    
    
    <ext:Column ColumnID="QUIZQUESTIONSTOTALColumn" 
    
    
    DataIndex="QUIZQUESTIONSTOTAL"
    
    
    Header="Questions"
    
    
    Width="80px">
    
    
    </ext:Column> 
    
    
    <ext:Column ColumnID="QUESTIONSANSWEREDCORRECTLYColumn" 
    
    
    DataIndex="QUESTIONSANSWEREDCORRECTLY"
    
    
    Header="Answers"
    
    
    Width="80px">
    
    
    </ext:Column>
    
    
    <ext:Column ColumnID="TIMESTAMP_Datecolumn"
    
    
    DataIndex="TIMESTAMP_Date"
    
    
    Header="Date"
    
    
    Width="100px">
    
    
    <Renderer Fn="Ext.util.Format.dateRenderer('M/d/Y')" /> 
    
    
    
    
    
    </ext:Column> 
    
    
    <ext:Column ColumnID="TIMESTAMP_Timecolumn" 
    
    
    DataIndex="TIMESTAMP_Time"
    
    
    Width="50px" 
    
    
    Header="Time">
    
    
    </ext:Column> 
    
    
    </Columns>
    
    
    </ColumnModel> 
    
    
    </ext:GridPanel>
    
    
    
    
    
    <ext:PagingToolBar ID="PagingToolBarGridPanelUserPortalQuiz" 
    
    
    runat="server" 
    
    
    StoreID="StoreUserPortalQuiz" 
    
    
    PageSize="10" 
    
    
    DisplayInfo="false" />
    
    
    
    
    
    
    </Content>
    
    
    </ext:Panel>
  2. #2

    RE: [CLOSED] How to make the grid to show the number of records that I want according to the pagination?

    Hi,

    Please show your Store control
    Vladimir Shcheglov
    Sr. Developer
  3. #3

    RE: [CLOSED] How to make the grid to show the number of records that I want according to the pagination?

    Hi,

    The following is the store control:

    
    
    
    <ext:Store ID="StoreUserPortalQuiz" runat="server"
    
    
    DataSourceID="ObjectDataSourceGridFetchUSERPORTALQUIZOnUSERID">
    
    
    <Reader>
    
    
    <ext:JsonReader IDProperty="ID">
    
    
    <Fields>
    
    
    <ext:RecordField Name="ID"/>
    
    
    <ext:RecordField Name="USERID"/>
    
    
    <ext:RecordField Name="PORTALTITLE"/> 
    
    
    <ext:RecordField Name="QUESTIONSANSWEREDCORRECTLY"/> 
    
    
    <ext:RecordField Name="QUIZQUESTIONSTOTAL"/> 
    
    
    <ext:RecordField Name="TIMESTAMP_Date" Type="Date"/> 
    
    
    <ext:RecordField Name="TIMESTAMP_Time"/> 
    
    
    <ext:RecordField Name="TOTALANSWERSTOPASSQUIZ"/>
    
    
    <ext:RecordField Name="QUIZRESULT"/>
    
    
    </Fields>
    
    
    </ext:JsonReader> 
    
    
    </Reader> 
    
    
    <SortInfo Direction="ASC" /> 
    
    
    </ext:Store>
  4. #4

    RE: [CLOSED] How to make the grid to show the number of records that I want according to the pagination?

    Hi,

    Please add the following to the store


    <AutoLoadParams>
    <ext:Parameter Name="start" Value="0" Mode="Raw" />
    <ext:Parameter Name="limit" Value="10" Mode="Raw" />
    </AutoLoadParams>
    Vladimir Shcheglov
    Sr. Developer
  5. #5

    RE: [CLOSED] How to make the grid to show the number of records that I want according to the pagination?



    Hi Vladimir,

    That worked fine.

    hanks for you help.


Similar Threads

  1. Replies: 1
    Last Post: Jan 08, 2012, 5:10 AM
  2. Replies: 1
    Last Post: Jan 05, 2012, 2:16 PM
  3. Replies: 1
    Last Post: Dec 22, 2011, 6:17 AM
  4. Replies: 2
    Last Post: Sep 26, 2011, 10:23 AM
  5. [CLOSED] GridView wrong number of records displayed
    By alexp in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 15, 2009, 11:03 AM

Posting Permissions