Hi KF,
Welcome to ASPNET newsgroup.
As for the applying style for the GridView's Columns, of course they can be
done statically through aspx template or programmatically through code. The
GridView Control has a Columns property which contains all the
columns(Fields) defined for it. We can access them through index, then each
column(field) has the ControlStyle property which can be used to configure
UI style for individual columns.
Thanks & Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Reply-To: "ke*****@nospam.nospam" <ke*****@u.washington.edu>
| From: <ke*****@nospam.nospam>
| Subject: Gridview: can column contents be programmatically styled?
| Date: Mon, 15 Aug 2005 10:15:38 -0700
| Lines: 14
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <eo**************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: idea.urel.washington.edu 128.95.9.12
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:118043
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I'm wondering if it's possible, outside of the declaration of an ASP.NET
2.0
| GridView, to programmatically style individual columns. For example, I
might
| want to make the text in a particular column bold, or larger.
|
| I know that Templates and other declarative mechanisms exist to make this
| happen. I'm wondering if you can apply the styling using code only. What
is
| the general syntax?
|
| Flash Actionscript has this "after the fact" programmatic styling, and it
| comes in handy.
|
| -KF
|
|
|