My DataGridView displays a “0” column with a delta in the first row and a * in the second. I don’t want these. They take up too much space. Is there a way to get them to go away?
I don’t think the code is pertinent in this case, but to humor y’all, here it is:
private void PopulateLanguageAndPrimary() {
string query;
OracleDataAdapter da;
OracleDataTable dt;
OracleCommand oc;
try {
oracleConnectionMainForm.Open();
query = "select position, coach from players where team = :team";
da = new OracleDataAdapter();
oc = new OracleCommand(query, oracleConnectionMainForm);
oc.Parameters.Add("team", greenBayPackers);
da.SelectCommand = oc;
dt = new OracleDataTable();
da.Fill(dt);
dataGridViewLanguageAndPrimary.DataSource = dt;
} catch (OracleException ex) {
MessageBox.Show(ex.Message);
} finally {
oracleConnectionMainForm.Close();
}
}
- added scream shot at: http://warbler.posterous.com/heres-the-unwanted-bling-on-the-datagridview#
Try setting
dataGridViewLanguageAndPrimary.AllowUserToAddRowto false. This will remove the *. Then setRowHeadersVisibleto false, hiding the superfluous column.