4.c# custom control pager PaginationControl

effect view

Please add image description

property setting

Insert image description here
Page — Current page
PagerCount — Number of keys
PageSize — Number of data items per page
PageSizes — Where is the drop-down box, you can change the type of data items per page, such as 10 items per page, 20 items per page.
Total total number of data

core event

Insert image description here
PaginationControl1_CurrentPageChanged is triggered when the current page changes.
PaginationControl1_PageSizeChanged is triggered when the number of each page is changed.

        private void paginationControl1_CurrentPageChanged(object sender,PaginationEventArgs e)
        {
    
    
            Console.WriteLine(e.Value);
        }

        private void paginationControl1_PageSizeChanged(object sender, PaginationEventArgs e)
        {
    
    
            Console.WriteLine(e.Value);
        }

code view

Insert image description here

Source code download

link: download

Guess you like

Origin blog.csdn.net/adsd1233123/article/details/128021212