You can use AJAX to update the grid when the user moves columns at run time. For example, you can update the grid with AJAX on column move in the Designer, in Source view, and in code.
In the Designer
To enable AJAX when moving a column, complete the following steps:
In Source View
Switch to Source view and add AllowColMoving="True" and CallbackOptions="ColMove" 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" AllowColMoving="True" CallbackOptions="ColMove">
In Code
To enable AJAX when moving a column, add the following code to the Page_Load event:
To write the code in Visual Basic:
Visual Basic |
Copy Code
|
---|---|
C1GridView1.AllowColMoving = True C1GridView1.CallbackOptions = CallbackOptions.ColMove |
To write the code in C#:
C# |
Copy Code
|
---|---|
C1GridView1.AllowColMoving = true; C1GridView1.CallbackOptions = CallbackOptions.ColMove; |
What You've Accomplished
Run the program and move a column. You will notice only the grid refreshes, not the entire page.