FrankR
Posts: 154
|
| Posted: 09/18/2006, 3:06 PM |
|
I have a grid in Column format, and I need to change a few of the labels to a different font - to get them into a monospace Courier font.
Sorry for the dumb question, but: how do I do this?
_________________
FR |
 |
 |
FrankR
Posts: 154
|
| Posted: 09/19/2006, 6:18 AM |
|
Answer is:
// Event BeforeShowRow
// -------------------------
// Write your own code here.
// -------------------------
System.Web.UI.WebControls.Literal ThisLiteral = (System.Web.UI.WebControls.Literal)(e.Item.FindControl("BCN_PCN_FORM1COMMENTS"));
if (ThisLiteral != null)
{
ThisLiteral.Text = "<font face='Courier New'>" + ThisLiteral.Text + "</font>";
}
else
{
ThisLiteral.Text = "[Unexpected error formatting text]";
}
_________________
FR |
 |
 |
garycrunk
Posts: 23
|
| Posted: 09/19/2006, 8:47 AM |
|
Hmmm... In my experience, you MAY have problems if you've assigned a "Style" to the page. However, you can go in manually and right mouse click on the label and go to properties.... And look at the "face" property to the font desired.
_________________
Gary Crunk
Job Examiner |
 |
 |
|