Datagrid HeaderStyle.CssClass applied to <tr>

R

Randel

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
 
M

marss

Randel said:
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
{

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top