3 Replies Latest reply on May 14, 2010 6:45 AM by kubens

    DataGrid Pagination

    udara liyanage

      I want a datagrid with pagination. Falsh builder 4 supports automatic pagination when scrollind down see this http://www.adobe.com/devnet/flex/articles/flashbuilder4_datapaging_php.html.But i want pagination with link buttons like 1,2,..Next,Prev.
      In most examples,whole set of data is fetched when grid is initialization.But I want grid to call server and fetch apporiate data eachtime user clicks link button.
      Ex:If I want to show 10 records per view and there are 100 records there should be atmost 10 butyons .When I click button '1' grid should call server and fetch first 10 records,if I click button '3' records btween 20-30 should be fetched from server.

        • 1. Re: DataGrid Pagination
          kubens

          I have developed a Paging-Toolbar component. You can see an example here.

           

          <wakcompsdata:PagingToolbar
              id="pagingToolbar"
              dataService="{dataService}"
              loadData="actionLoad()"
              loadDataEnhanced="actionLoadLookup()"
              limit="10"
              left="0"
              right="0"
              bottom="0" 
              borderSides="top"
              textDisplayingLabel="{resourceManager.getString('main', 'pagingtoolbar_text_displaying')}"
              textPageLabel="{resourceManager.getString('main', 'pagingtoolbar_text_page')}"
              textPageOfLabel="{resourceManager.getString('main', 'pagingtoolbar_text_page_of')}"
              buttonFirstPageLabel="{resourceManager.getString('main', 'pagingtoolbar_button_first_page_label')}"
              buttonLastPageLabel="{resourceManager.getString('main', 'pagingtoolbar_button_last_page_label')}"
              buttonNextPageLabel="{resourceManager.getString('main', 'pagingtoolbar_button_next_page_label')}"
              buttonPreviousPageLabel="{resourceManager.getString('main', 'pagingtoolbar_button_previous_page_label')}"
          />

          • 2. Re: DataGrid Pagination
            udara liyanage Level 1

            thsnk u very much,i will try to do this

            • 3. Re: DataGrid Pagination
              kubens Level 2

              I used the opportunity to create cookbook recipe. This describes the usage of the different attributes and events of the component. Hope that helps a little bit more.