Microsoft Communities

Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

How do I hide a column?

Sometimes you will want to display only some of the columns that are available in a DataGridView. For example, you might want to show an employee salary column to users with management credentials while hiding it from other users.

To hide a column programmatically

In the DataGridView control, the column's Visible property determines whether the column is displayed.

To hide a column using the designer
  1. Choose Edit Columns from the control's smart tag.
  2. Select a column from the Selected Columns list.
  3. In the Column Properties grid, set the Visible property to false.


Page view counter