DataGrid with image in the Column Header

Posted: 07-17-2003, 07:43 PM
Is it possible to have both an image and text as part of a Column Header in
a DataGrid? Ideally, you could click on either sort the column. I have not
been successful yet - if I add an image, the text does not show. I suppose
I could create a .gif with each piece of text in it, but I was **really**
hoping to avoid that.

Suggestions?

Thanks in advance.

Mark


Reply With Quote

Responses to "DataGrid with image in the Column Header"

Teemu Keiski
Guest
Posts: n/a
 
Re: DataGrid with image in the Column Header
Posted: 07-17-2003, 08:36 PM
Couldn't you overcome it if you'd use TemplateColumn and set the image and
text (link?) to HeaderTemplate?

In the HeaderTemplate set the link for example with LinkButton and set
"Sort" as command name for it and then the sort argument you wish to use as
command argument (of course DataGrid needs to be with AllowSorting="true").

--
Teemu Keiski
MCP, Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi

AspInsiders Member, www.aspinsiders.com
ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com


"Mark" <field027_nospam_@umn.edu> wrote in message
news:uzIsNOJTDHA.2120@TK2MSFTNGP11.phx.gbl...
> Is it possible to have both an image and text as part of a Column Header
in
> a DataGrid? Ideally, you could click on either sort the column. I have
not
> been successful yet - if I add an image, the text does not show. I
suppose
> I could create a .gif with each piece of text in it, but I was **really**
> hoping to avoid that.
>
> Suggestions?
>
> Thanks in advance.
>
> Mark
>
>

Reply With Quote
 
LinkBack Thread Tools Search this Thread Display Modes
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to set column header via code AndrewGomes ASP.NET Data Grid Control 2 07-18-2003 11:05 AM
Problem to Access web control on the DataGrid Header Prasad ASP.NET Data Grid Control 0 07-11-2003 11:28 AM
Datagrid not diplaying header text Atif Jalal ASP.NET Data Grid Control 1 07-08-2003 11:18 PM
Template Column with button in header Teemu Keiski ASP.NET Data Grid Control 1 07-03-2003 06:40 PM
how to check controls that on datagrid header Matt ASP.NET Data Grid Control 0 06-30-2003 02:55 PM