ComponentOne GridView for ASP.NET AJAX: GridView for ASP.NET AJAX Quick Start > Step 2 of 3: Customizing the C1GridView Control

Step 2 of 3: Customizing the C1GridView Control

In the previous step of the quick start you created a simple grid application and bound the grid to a datasource. In this step you'll customize the initial grid application further by changing the grid's appearance and behavior settings.

Complete the following steps to continue:

1.   Click once on the C1GridView control to select it and navigate to the Properties window.

2.   Click the drop-down arrow next to the VisualStyle property and select Vista in the list of themes. For more information, see the Visual Styles topic.

3.   Click the C1GridView control's smart tag, and in the C1GridView Tasks menu, select Property builder.

The C1GridView Properties dialog box will open.

4.   On the General tab, click the Allow sorting check box.

5.   Click the Paging tab, and click the Allow paging check box. Note that, by default, Bottom is selected for the position of the navigation, and the Numeric mode is selected.

6.   Click the Columns tab in the C1GridView Properties dialog box. Here you can add and remove columns and change column settings.

7.   In the Selected columns list, choose any columns you wish to remove and press the  button. For example, remove the ProductID, SupplierID, and CategoryID, UnitsOnOrder, and ReorderLevel columns.

8.   In the Selected columns list, choose the UnitPrice column.

9.   In the Column properties grid, click the drop-down arrow next to the DateFormatString property and select {0:c}. This will set the column to appear as currency at run time.

10.  Click Apply to apply your changes, and click OK to close the C1GridView Properties dialog box.

11.  Click once on the C1GridView control and, in the Properties window, set the AllowGrouping property to True.

12.  In the Properties window, set the AllowColMoving property to True.

You've now completed binding the C1GridView control and customizing the grid's appearance and behavior settings. In the next, and final, step you'll run your application to observe the changes you made.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.