DataGrid MultiColor Titles

G

Guest

I am creating a windows .NET application (in C#) that uses a datagrid. I am
using
Visual Studio .NET 2003. In the title row of the grid, I'd like one of the
headers to appear in two different colors. For example, the title of one of
the columns is
"Surplus / (Shortfall)". I would like the parentheses and the word
"Shortfall" to appear in red, while the word "Surplus" and the slash appear
in black. Is this possible? How would I do this. Thanks in advance.


PS I have posted this in microsoft.public.dotnet.languages.csharp, but I'm
not sure if I put it in the correct place, so I'm posting it here as well. I
apologize in advance for the double post.
 
B

Brian Schwartz

Either forum is fine, though I think the csharp forum gets more traffic and
thus has more potential for an answer.

In this case, I don't think there is a way to do what you are after,
unfortunately. Some third-party products may have a way--the one below can
be made to do it, though it's not straightforward--this is an unusual
feature I'm not sure I've ever seen offered by a grid before. The only other
option that comes to mind *maybe* is Spread, by FarPoint. And the only
reason I can even conceive of it is that it is more of a spreadsheet tool,
and spreadsheets (like Excel) support formats that include coloring, at
least in cells. Maybe Spread can do it in a header. But I have no idea. I
know FarPoint offers a free 30-day trial--if you are even interested in
exploring third-party products as an option.
 
D

Donald

Hi Paul,

If you are interested in the third-party route, as Brian mentioned,
our Spread for Windows Forms component will do this -
http://www.farpointspread.com/netproducts/spreadwin/spreadwin.aspx.

You can set up a header cell as a richtext celltype and add what ever
color formatting you need. Our support team will be able to give you
an example - (e-mail address removed). You can also post this question on
our forums at http://www.clubfarpoint.com/Forums/forums/default.aspx
and someone will get right back to you.

Thanks for the recommendation Brian!

- Donald
FarPoint Technologies
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top