Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fontsize when populating a datagrid dynamically

Status
Not open for further replies.

vituja123

Programmer
Jun 16, 2005
110
US
Hi All,

Me again.

Just have a simple question this time.

I can't seem to change the font size dynamically when loading data into a datagrid. All the other commands work fine but when I get to e.Item.Font.Size = FontSize.XXSmall, the FontSize.XXSmall part is highlighted in blue.

What am I doing wrong?

e.Item.BackColor = Color.White
e.Item.BorderColor = Color.Black
e.Item.BorderStyle = BorderStyle.Outset
e.Item.ForeColor = Color.Orange
e.Item.Font.Bold = False
-> e.Item.Font.Size = FontSize.XXSmall
 
Try this syntax
Code:
 e.Item.Font.Size = FontUnit.XXSmall

However in my tests it had no effect.
 
That was it! Thanks jbenson001.

It is never as obvious as it seems...
 
Glad I could help. It took some playing to find the right syntax, not too straight forward.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top