Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Design idea of Flex DataGrid paging control

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the design ideas of the Flex DataGrid paging control, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Flex DataGrid paging (client, server)

In the past two days, we have made a Flex DataGrid paging control, which supports both client-side and server-side paging forms. Here we focus on sharing ideas. Although it is done with flex, as long as you master the idea, you can achieve the same effect with other programming languages.

Design ideas:

1, client, server

(1) client paging: when the data is fetched to the client at one time, which page of data the customer wants to see and which page of data is displayed.

(2) server paging: which page of data the client wants to see and which page of data is requested from the server, and the client displays the requested data to the user (caching can be done on the client and server to speed up the reading of the data). Since flex itself does not have the ability to access the database, you can consider transmitting data to the server through WebServices, which can be expressed in the form of XML or JSON (this article uses XML).

2Design of the paging presentation layer of Magi Flex DataGrid

(1) there are four buttons in the page number bar; these four buttons go to the * page, the previous page, the next page, and * one page respectively; when any of the four buttons are clicked, the page number should be redrawn and the current page number changes; also consider that when there is a * page in the page number, the first two buttons should be hidden; when there is a page in the page number, the last two buttons should be hidden.

(2) the page number in the page number bar; when you click the page number in the page number bar, the display data can be updated in DataGrid, and the current page number changes.

(3) display the total number of pages and records

(4) the number of records per page, let the user select through the drop-down box; when the user selects a new number of records per page, the page number will be redrawn, the total number of pages will change, and the current page number will change.

(5) Page number input box, which allows the user to enter any page number (to check whether the input data is legal), DataGrid displays the data in the page number, the page number needs to be redrawn, and the total number of pages changes.

(6) check all; the special circumstances in the paging, set the count of each page to the total number of records to meet the requirements! The page number needs to be redrawn, the total number of pages has changed, and the current page number has changed

Thank you for reading this article carefully. I hope the article "the Design ideas of Flex DataGrid pagination Control" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report