Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6185193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:40:11+00:00 2026-05-24T01:40:11+00:00

I have a data grid consisting of 3 columns & many rows, i want

  • 0

I have a data grid consisting of 3 columns & many rows, i want to show only the first 20 rows to user. Is there any way i can show only the first 20 rows in my datagrid.After by clicking button ‘next’, next 20 rows should display and so on…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:40:13+00:00Added an answer on May 24, 2026 at 1:40 am

    If you have a list as a data provider (ArrayCollection or so) you can use filterFunction to filter your list.

    The sample code is here:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application initialize="init()" layout="absolute" minHeight="600" minWidth="955"
        xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            import mx.utils.StringUtil;
    
            private static const DP_LENGTH:int = 100;
            private static const VISIBLE_ROWS_COUNT:int = 20;
    
            [Bindable]
            private var currentPage:int = 0;
    
            [Bindable]
            private var dataProvider:ArrayCollection;
    
            protected function init():void
            {
                var dpArray:Array = [];
                for (var i:int = 0; i < DP_LENGTH; i++)
                {
                    var item:Object = { first: i, second: Math.random(), third: Math.random() };
                    dpArray.push(item);
                }
                dataProvider = new ArrayCollection(dpArray);
                dataProvider.filterFunction = pagingFilterFunction;
                dataProvider.refresh();
            }
    
            protected function nextPage():void
            {
                currentPage++;
                dataProvider.refresh();
            }
    
            protected function prevPage():void
            {
                currentPage--;
                dataProvider.refresh();
            }
    
            private function pagingFilterFunction(item:Object):Boolean
            {
                var start:int = currentPage * VISIBLE_ROWS_COUNT;
                var end:int = start + VISIBLE_ROWS_COUNT - 1;
                var index:int = dataProvider.getItemIndex(item);
                return (index >= start) && (index <= end);
            }
        ]]>
        </mx:Script>
        <mx:VBox horizontalAlign="center" horizontalCenter="0" verticalCenter="0">
            <mx:DataGrid dataProvider="{dataProvider}">
                <mx:columns>
                    <mx:DataGridColumn dataField="first" headerText="First" />
                    <mx:DataGridColumn dataField="second" headerText="Second" />
                    <mx:DataGridColumn dataField="third" headerText="Third" />
                </mx:columns>
            </mx:DataGrid>
            <mx:Label 
                text="{StringUtil.substitute('Page {0} of {1}', currentPage + 1, Math.floor ((DP_LENGTH - 1) / VISIBLE_ROWS_COUNT) + 1)}" />
            <mx:HBox>
                <mx:Button click="prevPage()" enabled="{currentPage > 0}" label="Prev" />
                <mx:Button click="nextPage()" enabled="{DP_LENGTH / VISIBLE_ROWS_COUNT - 1 > currentPage}" label="Next" />
            </mx:HBox>
        </mx:VBox>
    </mx:Application>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a data file(csv) consisting of 2 columns & 1000 rows, as i
I have a data grid view ( say 5 columns ) . User has
I have a Data grid with DatagridComboBoxColumn , and i want to Fire Event
Consider I have a data grid, I need to find the number of rows
Here's my current problem: I have a data grid with 4 columns in it:
I have a data grid that looks like this <tk:DataGrid ItemsSource={Binding Parents} AutoGenerateColumns=False> <tk:DataGrid.Columns>
I have written following to show my data into grid view. This is the
Let’s say I have a data grid and there’s a method attached to clicking
I have a data grid where users can drag columns and reposition them. But
I am working on my first project using ExtJS. I have a Data Grid

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.