Colors in a DataGrid

  • Thread starter Thread starter Geoff Jones
  • Start date Start date
G

Geoff Jones

Hiya

I'm hoping that somebody can help me with something that has been puzzling
me today.

I have a DataGrid. I can change the colors of various thing e.g. the
Background color of the DataGrid. However, there is one color, no matter how
much I try, that I can't change. If I fill the DataGrid with data, the first
item i.e. in the top left of the grid is automatically selected i.e. the
text is highlighted in Blue. The text behind the highlighted text is a grey
color (which I assume is the Control color). However, I don't seem to be
able to set this to another color.

Does anybody know how to do this?

Thanks in advance

Geoff
 
Hi,

http://www.onteorasoftware.com/downloads/coloredcolumns.zip

Ken
----------------
Hiya

I'm hoping that somebody can help me with something that has been puzzling
me today.

I have a DataGrid. I can change the colors of various thing e.g. the
Background color of the DataGrid. However, there is one color, no matter how
much I try, that I can't change. If I fill the DataGrid with data, the first
item i.e. in the top left of the grid is automatically selected i.e. the
text is highlighted in Blue. The text behind the highlighted text is a grey
color (which I assume is the Control color). However, I don't seem to be
able to set this to another color.

Does anybody know how to do this?

Thanks in advance

Geoff
 
You should look into the 'SelectionBackColor' and 'SelectionForeColor'
of the Datagrid options. If you don't setup a custom tablestyle within
your code, changing these values in the designer should produce your
desired output.
 
Back
Top