473,324 Members | 2,268 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Colors in a DataGrid

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
Nov 21 '05 #1
3 1173
Hi,

http://www.onteorasoftware.com/downl...redcolumns.zip

Ken
----------------
"Geoff Jones" <no********@email.com> wrote in message
news:41*********************@news.dial.pipex.com.. .
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

Nov 21 '05 #2
Thanks Ken

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
Hi,

http://www.onteorasoftware.com/downl...redcolumns.zip

Ken
----------------
"Geoff Jones" <no********@email.com> wrote in message
news:41*********************@news.dial.pipex.com.. .
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

Nov 21 '05 #3
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.

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: James | last post by:
I have a data grid refresh problem. I have a few columns and the first column is data in the form of numbers. And in the form of the data grid if I specify for example something like a code(in a...
7
by: Matthew Wieder | last post by:
Hi - I have a datagrid that has a black header and the rows alternate white and gray. The problem is that until items are added to the grid, the grid appears as a large black rectangle, which is...
3
by: Amil Hanish | last post by:
Don't answer this if you don't know what you are talking about. I have lots of datagrids on many pages. I want to use a css stylesheet so color changes can be easily made via a single file. I...
9
by: tshad | last post by:
Is there a way to use your own image in place of the automatic one that ASP uses when doing editing in your DataGrid pages? We already have a style of button we are using and would like to be...
4
by: Kurt Schroeder | last post by:
I have a data grid with about 20 repeating items. they data: colors, red colors,blue colors, green Animals cat animals bird people, Tom people, Bill people, Kris
5
by: Dave | last post by:
In a VB.NET application, I have a datagrid that I export to an Excel spreadsheet like this: ' Set the content type to Excel Response.ContentType = "application/vnd.ms-excel" Dim tw As New...
7
by: Dave | last post by:
Are there any add-on products or samples available that can do the following in an vb.net datagrid I want to compare 2 rows in a datagrid - one row from one database and another row for another...
4
by: tg | last post by:
Visual Studio 2003 My problem is that I am dynamically creating a datagrid on pageload. The datagrid is completely dynamic as it is based on the number of columns returned from a recordset. The...
3
by: Lars Netzel | last post by:
(applies to Windows Form .NET 2003) I'm filling a datagrid from a Datatable and applying a DataGridStyle. The Source Fields are "Name", "Value", "Locked" and the Style's Columns are "Name",...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.