How to put limit on the data grid view columns...

dotnetnovice

Newcomer
Joined
Aug 25, 2009
Messages
1
Hi everybody i need some help regarding my project actually i am using a data grid view control in my project and this data gridview is set to data reader now what i want is to just limitise the no of columns the grid view showing.
Actually i have 4 columns in my data base and i want just 2 of them to be display on the data grid...

Here is the code.

private void Form1_Load(object sender, EventArgs e)
{

DBHandler ObjDBHandler = new DBHandler();
dataGridView3.DataSource = ObjDBHandler.GetAllPrograms();

}

can any body tell me how to customise the data grid view control in the following context
 
Back
Top