You can use AJAX to update the grid when the user filters columns at run time. For example, you can update the grid with AJAX on filtering in the Designer, in Source view, and in code. For more information about filtering columns, see the Filtering topic.
In the Designer
To enable AJAX when filtering a column, complete the following steps:
In Source View
Switch to Source view and add ShowFilter="True" and CallbackOptions="Filtering" 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" ShowFilter="True" CallbackOptions="Filtering">
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.ShowFilter = True C1GridView1.CallbackOptions = CallbackOptions.Filtering |
To write the code in C#:
C# |
Copy Code
|
---|---|
C1GridView1.ShowFilter = true; C1GridView1.CallbackOptions = CallbackOptions.Filtering; |
What You've Accomplished
Now when you run the program and filter a column, you will notice that only the grid refreshes.