473,395 Members | 2,423 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,395 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 1178
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.