Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Datagrid HeaderStyle.CssClass applied to <tr>

Reply
Thread Tools

Datagrid HeaderStyle.CssClass applied to <tr>

 
 
Randel
Guest
Posts: n/a
 
      02-13-2007
Hi.

I am building a datagrid based on a datatable. I am attempting to
apply a style value using the syntax
Datagrid.HeaderStyle.CssClass="mystyle".

When the datagrid renders, the style is applied at the row level
(example below)
<tr class="mystyle" align="Left" valign="Top">
<td>Name</td><td>City</td><td>Begin Date</td><td>Category</
td><td>Calendar</td></tr>

I need it to apply at the column level
<tr align="Left" valign="Top">
<td class="mystyle">Name</td><td class="mystyle">City</td><td
class="mystyle">Begin Date</td><td class="mystyle">Category</td><td
class="mystyle">Calendar</td></tr>

I can't figure this out. Can you help?

Thanks. Randy

 
Reply With Quote
 
 
 
 
marss
Guest
Posts: n/a
 
      02-14-2007

Randel wrote:
> Hi.
>
> I am building a datagrid based on a datatable. I am attempting to
> apply a style value using the syntax
> Datagrid.HeaderStyle.CssClass="mystyle".
>
> When the datagrid renders, the style is applied at the row level
> (example below)
> <tr class="mystyle" align="Left" valign="Top">
> <td>Name</td><td>City</td><td>Begin Date</td><td>Category</
> td><td>Calendar</td></tr>
>
> I need it to apply at the column level
> <tr align="Left" valign="Top">
> <td class="mystyle">Name</td><td class="mystyle">City</td><td
> class="mystyle">Begin Date</td><td class="mystyle">Category</td><td
> class="mystyle">Calendar</td></tr>
>
> I can't figure this out. Can you help?
>
> Thanks. Randy


Hi,

Add to stylesheet:
..mystyle td
{
//cell style properties
}
It applies to table cell.

But the grid header usually renders as "<tr><th ..." and not
"<tr><td ...". In this case use
..mystyle th
{

}

 
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
Call For Papers: June 26-29, 2006, joint conferences in computer science, computer engineering & applied computing; USA A. M. G. Solo VHDL 0 01-13-2006 09:51 AM
Wireless Policy Not Being Applied Ben Wireless Networking 0 01-06-2006 04:04 PM
Crypto map applied on loopback interface Sebastian Cisco 0 04-15-2005 10:42 PM
how HSRP redundancy can be applied to crypto IPSec profile ? He Ming Cisco 0 07-13-2004 03:28 AM
Re: How to remove all automatically applied styles from a datagrid? Manfred Braun ASP .Net 3 08-18-2003 07:59 PM



Advertisments