G
Guest
Hi,
I have a datagrid and am trying to set it's selectionbackcolor, and though
all the other things work, this and the selectionforecolor don't. Any idea
why? Also, I have the cells set to read-only, but don't like how the text is
highlighted (blue), making it look as if you could change it. Is there a way
to set it so that just the background changes color?
Thanks,
Mel
DataGridTableStyle ts = new DataGridTableStyle();
ts.MappingName = "Catalog";
ts.BackColor = Color.Black;
ts.ForeColor = Color.LightGray;
ts.HeaderBackColor = Color.Black;
ts.HeaderForeColor = Color.DarkKhaki;
ts.HeaderFont = fontsmall16;
ts.AlternatingBackColor = Color.Black;
ts.GridLineStyle = DataGridLineStyle.None;
ts.ReadOnly = true;
ts.RowHeadersVisible = false;
ts.AllowSorting = true;
ts.SelectionBackColor = Color.Black;
ts.SelectionForeColor = Color.Red;
I have a datagrid and am trying to set it's selectionbackcolor, and though
all the other things work, this and the selectionforecolor don't. Any idea
why? Also, I have the cells set to read-only, but don't like how the text is
highlighted (blue), making it look as if you could change it. Is there a way
to set it so that just the background changes color?
Thanks,
Mel
DataGridTableStyle ts = new DataGridTableStyle();
ts.MappingName = "Catalog";
ts.BackColor = Color.Black;
ts.ForeColor = Color.LightGray;
ts.HeaderBackColor = Color.Black;
ts.HeaderForeColor = Color.DarkKhaki;
ts.HeaderFont = fontsmall16;
ts.AlternatingBackColor = Color.Black;
ts.GridLineStyle = DataGridLineStyle.None;
ts.ReadOnly = true;
ts.RowHeadersVisible = false;
ts.AllowSorting = true;
ts.SelectionBackColor = Color.Black;
ts.SelectionForeColor = Color.Red;