Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > how to assign a css class to datagrid header that is a link?

Reply
Thread Tools

how to assign a css class to datagrid header that is a link?

 
 
djc
Guest
Posts: n/a
 
      11-05-2004
I have a datagrid that has several sortable columns. So the headers become
hyperlinks. I need to be able to assign a css class to just these
hyperlinks? how can I do that? For example, right now I can just assign css
styles to the A tag which does control them but that also controls ALL the
other links on the page, which I don't want.

is there a way? (other than assigning other classes to all the *other*
hyperlinks on the page ... which *is* my plan B)

any input is appreciated. Thanks.


 
Reply With Quote
 
 
 
 
Jos
Guest
Posts: n/a
 
      11-06-2004
djc wrote:
> I have a datagrid that has several sortable columns. So the headers
> become hyperlinks. I need to be able to assign a css class to just
> these hyperlinks? how can I do that? For example, right now I can
> just assign css styles to the A tag which does control them but that
> also controls ALL the other links on the page, which I don't want.
>
> is there a way? (other than assigning other classes to all the *other*
> hyperlinks on the page ... which *is* my plan B)
>
> any input is appreciated. Thanks.


Set the CssClass property, and use a class (let's call it "header") like
this:

..header { color:blue; } // style of header itself goes here
..header A { color:red; etc; etc; } // style of link goes here

--

Jos


 
Reply With Quote
 
 
 
 
djc
Guest
Posts: n/a
 
      11-06-2004
you just made my day Jos! I thought it was something that would wind up
being handled completely within css and not an aspnet thing. I read a book
on CSS some time ago but I just couldn't remember that syntax. (i don't use
it often only because programming/webdesign is not actually my job... more a
hobby) I need to review that book man. Thank you!


"Jos" <> wrote in message
news:%...
> djc wrote:
> > I have a datagrid that has several sortable columns. So the headers
> > become hyperlinks. I need to be able to assign a css class to just
> > these hyperlinks? how can I do that? For example, right now I can
> > just assign css styles to the A tag which does control them but that
> > also controls ALL the other links on the page, which I don't want.
> >
> > is there a way? (other than assigning other classes to all the *other*
> > hyperlinks on the page ... which *is* my plan B)
> >
> > any input is appreciated. Thanks.

>
> Set the CssClass property, and use a class (let's call it "header") like
> this:
>
> .header { color:blue; } // style of header itself goes here
> .header A { color:red; etc; etc; } // style of link goes here
>
> --
>
> Jos
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
Header files with "header.h" or <header.h> ?? mlt C++ 2 01-31-2009 02:54 PM
Any way to reorder how a datagrid is drawn (header/footer/items vs.header/items/footer)? Henrik ASP .Net Datagrid Control 1 07-06-2006 12:23 AM
Assign CSS to DataGrid header Maziar Aflatoun ASP .Net Datagrid Control 1 12-21-2004 09:45 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57