Hi Hans,
I think Hans's suggestion on using TemplateField is reasonable. The
build-in fields can not allow inline databinding expression, so we have to
utitlize the templateField which can allow define inline html template for
Header and other Item...
If there're any other questions, please feel free to post here.
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Binding the header text of a GridView column?
| thread-index: AcXljgQYg2NmbV8jRPykLS8iuiWXXQ==
| X-WBNR-Posting-Host: 70.59.48.45
| From: "=?Utf-8?B?dGlta2xpbmc=?=" <ti******@discussions.microsoft.com>
| References: <11*******************************@40tude.net>
| Subject: RE: Binding the header text of a GridView column?
| Date: Wed, 9 Nov 2005 16:30:56 -0800
| Lines: 21
| Message-ID: <F4**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:356877
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hans,
|
| If you convert the column into a TemplateColumn, you can specify a
| HeaderTemplate where you can put any binding code you want. If your
object
| isn't public or protected, expose a public or protected property of the
page
| code behind that returns the results of the method call.
|
| Tim
|
| "Hans Merkl" wrote:
|
| > Hi,
| >
| > I was wondering if it's possible to bind the header text of a GridView
| > column to a method of an object I have. At the moment I am setting the
| > header texts in Page_Load but I was wondering if I can do with
databinding.
| >
| > thanks
| >
| > Hans Merkl
| >
|