From your question, I would imagine you don't want to show certain "columns" within the datagridview? If so, use the Columns property to add and remove any automatically created columns that are found on the datasource which you use to attach to the grid.
The DataGridView by default will create columns for all public properties on the underlying data source object. So,
public class MyClass
{
private string _name;
public string Name
{
get{ return _name; }
set { _name = value; }
}
public string TestProperty
{
{ get { return "Sample"; }
}
}
...
[inside some form that contains your DataGridView class]
MyClass c = new MyClass();
// setting the data source will generate a column for "Name" and "TestProperty"
dataGridView1.DataSource = c;
// to remove specific columns from the DataGridView
// dataGridView1.Columns.Remove("TestProperty")