You can use AJAX to update the grid when the user pages the grid at run time. For example, you can update the grid with AJAX on grid paging in the Designer, in Source view, and in code. For more information about paging, see Paging and Creating a Pageable Grid.
In the Designer
To enable AJAX when paging through a C1GridView, complete the following steps:
In Source View
Switch to Source view and add AllowPaging="True" and CallbackOptions="Paging" to the <cc1:C1GridView> tag, so it appears similar to the following:
<cc1:C1GridView ID="C1GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="AccessDataSource1" VisualStylePath="~/C1WebControls/VisualStyles" AllowPaging="True" CallbackOptions="Paging">
In Code
To enable AJAX when filtering a column, add the following code to the Page_Load event:
To write the code in Visual Basic:
Visual Basic |
Copy Code
|
---|---|
C1GridView1.AllowPaging = True C1GridView1.CallbackOptions = CallbackOptions.Paging |
To write the code in C#:
C# |
Copy Code
|
---|---|
C1GridView1.AllowPaging = true; C1GridView1.CallbackOptions = CallbackOptions.Paging; |
What You've Accomplished
Run the program and click the paging navigation at the bottom of the grid. Notice that only the grid refreshes as you page through it. The entire page is not reloaded.