public void getData() { try { BusinessManager BM = new BusinessManager(); DataTable dt = BM.BALGetProductData(); dataGridView1.DataSource = dt; DataGridViewColumn col1 = dataGridView1.Columns[0]; DataGridViewColumn col2 = dataGridView1.Columns[1]; DataGridViewColumn col3 = dataGridView1.Columns[2]; col1.Width = 215; col2.Width = 215; col3.Width = 215; } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }