My DataTable has three columns fetched from a database, while I need to bind only two columns of it to a DataGridView. Can you please help me with
DataTable
DataGridView
Bind DataTable to DataGridView after that hide the column you don't want.
dataGridView1.DataSource = datatable; dataGridView1.Columns["ColumnName"].Visible = false;