This topic demonstrates how to display the contents of C1GridView on multiple pages, navigate through those pages and set the number of items to be displayed on each page. For more information, see the Paging topic.
In the Designer
Complete the following steps:
In Source View
Complete the following steps:
<cc1:C1GridView ID="C1GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="AccessDataSource1" VisualStylePath="~/C1WebControls/VisualStyles" AllowPaging="True" PageSize="4">The PagerSettings.Mode property is set to Numeric by default, so numeric navigation buttons appear on the page.
In Code
Complete the following steps:
To write the code in Visual Basic:
Visual Basic |
Copy Code
|
---|---|
C1GridView1.AllowPaging = True C1GridView1.PageSize = 4 |
To write the code in C#:
C# |
Copy Code
|
---|---|
C1GridView1.AllowPaging = true; C1GridView1.PageSize = 4; |
What You've Accomplished
Run your application and observe that paging controls appear at the bottom of the grid, and that 4 items are displayed on each page: