473,472 Members | 2,224 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DataGrid's Header Colors

Hello,
I want to set DataGird's header fore and backcolors. The DataGrid or
TableStyle properties named HeaderForeColor and HeaderBackColor don't
work as they have some weird behavior.
Like ForeColor becomes HeaderBack color and If I set header backcolor it
does not have any affect. Can anyone tell me that how can I set header
fore/back color. How can this be achieved if Custom painting is the
answer.

Thanks in Advance.
Maqsood Ahmed [MCP C#,SQL Server]
Kolachi Advanced Technologies
http://www.kolachi.net

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
2 3713
Hi;
Your comment is ??? how to work c# web form, windows form etc..

try it;
SampleDataGrid.Items[ Count].Cells[ CaseCount ].Style[ "BACKGROUND-COLOR" ]
= "#f0f8ff";
SampleDataGrid.Items[ Count].Cells[ CaseCount ].Style[ "Color" ] = "black";

"Maqsood Ahmed" wrote:
Hello,
I want to set DataGird's header fore and backcolors. The DataGrid or
TableStyle properties named HeaderForeColor and HeaderBackColor don't
work as they have some weird behavior.
Like ForeColor becomes HeaderBack color and If I set header backcolor it
does not have any affect. Can anyone tell me that how can I set header
fore/back color. How can this be achieved if Custom painting is the
answer.

Thanks in Advance.
Maqsood Ahmed [MCP C#,SQL Server]
Kolachi Advanced Technologies
http://www.kolachi.net

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #2
Hello,
This query was System.Windows.Form.DataGrid control basically.

Maqsood Ahmed [MCP C#,SQL Server]
Kolachi Advanced Technologies
http://www.kolachi.net

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #3

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

Similar topics

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...
2
by: EMW | last post by:
I have a datagrid on my ASPx page bound to a dataview of a dataset table. The first 4 columns are bound, the rest (31) are template columns with a imagebutton inside. I would like to be able to...
1
by: EMW | last post by:
I have a datagrid on my ASPx page bound to a dataview of a dataset table. The first 4 columns are bound, the rest (31) are template columns with a imagebutton inside. I would like to be able to...
5
by: ~~~ .NET Ed ~~~ | last post by:
Well, maybe not half-baked but 75%. I find very frustrating working with the DataGrid control. It offers a lot of functionality which really comes in handy. Unfortunately you can only enjoy a...
4
by: sakieboy | last post by:
I currently have a datagrid with several columns. The first column in the DataGrid is a HyperLinkColumn. When I select a row, I would like for this HyperlinkColumn to fire. I have the mouseover...
7
by: PJ | last post by:
How can you set the background color of individual columns in a datagrid to be different to others? The table styles only allow you to do this at the grid level for all columns.
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...
13
by: pmcguire | last post by:
I have a DataGrid control for which I have also created several new extended DataGridColumnStyles. They behave pretty nicely, but I can't figure out how to implement Selected Item formatting for...
3
by: Blasting Cap | last post by:
I have an app that gives a user an option to pull an online report into Excel. I have the rows formatted in a couple different colors, with a grey header & footer. No matter what colors the...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
1
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.