Processing of page turning of ListView Big Data Display (continued)

Source: Internet
Author: User
In the previous article, we wrote the ListView Big Data paging processing, which mainly described the paging processing idea. This article mainly makes some changes to the page control ListViewPager in the previous article, allowing him to automatically bind pages. ListViewPager provides open usage, while ListViewPagerEx provides DataSource, ListView, BindedColumns, and other attributes to turn off the page turning event, making it easier to use.
Class Name: ListViewPagerEx
Attribute:
ListView // The ListView to which the object belongs
DataSource // prepare the able displayed on the ListView
BindedColumns // bind it to the column index array in the corresponding DataSource on the ListView. If no value is assigned, the DataSource is bound to the column in the order of its columns by default.
Public method:
Start (); // make the ListViewPagerEx control take effect
GetListViewPageRecordNum (ListView); // gets the maximum number of data entries displayed on each page of ListView.

Usage:
Create a new Form, drag the ListView control and ListViewPagerEx control, set the ListView View-> Details, FullRowSelect-> True, set the column, and then set the ListView attribute of the ListViewPagerEx control, set it to the ListView of the current Form.
Add method InitForm (); // In this method, construct/or retrieve a data table able, set the DataSource attribute of ListViewPagerEx to this DataTable, and then add the following sentence: listViewPagerEx1.Start. Of course, the column sequence of ListView is inconsistent with that of DataTable. You can use the BindedColumns attribute for ing.
Download the source code and test demo.
The code is completed in vs2003 and can be directly transplanted to vs2005.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.