ComponentOne GridView for ASP.NET AJAX: GridView for ASP.NET AJAX Task-Based Help > Formatting the Grid's Content > Hiding Specified Columns

Hiding Specified Columns

You can choose to hide columns in the C1GridView control by setting the Visible property for those columns to False. To specify the columns to be displayed in C1GridView, complete the following steps:

1.   Right-click C1GridView and select Show Smart Tag from the context menu.

2.   Select Property builder from the C1GridView Tasks menu. The C1GridView Properties dialog box appears.

3.   Click the Columns tab in the left pane.

4.   Uncheck Create columns automatically at run time if it is checked.

5.   Select a column that you do not want to appear from the list of Selected columns.

6.   Under Column properties, set the Visible property to False. Do this for any column in the data source that you do not want to appear in the grid.

Note that you can also remove columns from being displayed by selecting the column in the Selected columns list and clicking the Delete button ("X").

7.   Click OK to save your settings and close the C1GridView Properties dialog box.

 What You've Accomplished

Run your application and observe that the columns that you changed the visibility for do not appear in the grid at run time.


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