473,326 Members | 2,196 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,326 software developers and data experts.

How Do I Change Grid HeaderText Fontsize?

Hello.

I have a datagrid with a datagridtablestyle and several
datagridtextboxcolumns. I have overridden the Paint method on the
datagridtextboxcolumns via a class called
"customdatagridtextboxcolumn," but can't figure out how to set a custom
font size for the column headers on the displayed windows form grid.
Can anyone help?

Thanks!
Steven

Aug 18 '06 #1
1 1656
"Steven C" <ch******@cox-internet.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
can't figure out how to set a custom
font size for the column headers on the displayed windows form grid.

Put something like this in your form constructor.

MyGrid.TableStyles[0].HeaderFont = new System.Drawing.Font("Microsoft San
Serif", 8.25f, System.Drawing.FontStyle.Bold);

-- Alan
Aug 18 '06 #2

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

Similar topics

12
by: pmud | last post by:
Hi, I am using teh following code for sorting the data grid but it doesnt work. I have set the auto generate columns to false. & set the sort expression for each field as the anme of that...
4
by: IGotYourDotNet | last post by:
on my web app, i need to display data from a table in a grid. (i know how to do that). The grid will be populated with data depending on what the user selects in a drop down box. My question is...
3
by: pmud | last post by:
Hi, I have a web page (asp.net, code:c#). I havean html table with text boxes. Based on the user input , records are displayed in the data grid below it. Now the datagrid has a large no. of...
4
by: Girish | last post by:
Im trying to create a grid within a grid programmatically. Ive been successful in doing this but I need the embedded grid to fire its ItemDataBound event so I can handle it. The event does not seem...
1
by: =?Utf-8?B?SGFycnkgS2Vjaw==?= | last post by:
I have a GridView control with a few columns declared directly in the aspx file. I have found that if I remove the HeaderText property from all columns that the GridView handles state completely...
1
by: rktester | last post by:
Hi, I am trying to implement an editable datagrid in .net 2005 This is how my grid is defined: <asp:DataGrid runat="server" id="dgUser" Font-Name="Verdana" Font-Size="9pt"...
0
by: PravinThanusu | last post by:
Hi i am fresher to the s/w field.. plz help me out.. <Columns> <asp:BoundField HeaderText="ID" DataField="ID" /> <asp:BoundField HeaderText="BuisnessName"...
0
by: Czechtim | last post by:
Hello, I have problem with databinding. I created small application using structure that I need to demonstrate problem. I need to change content of label when changing content of property...
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...
0
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...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...

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.