Difficulties with custom datagrid

P

pbd22

Hi.

I need to style the rows in my datagrid such that:

<tr>
<td class="tdEven left"><img src="img/table_teaser.jpg" alt="teaser"
class="teaserImage">
<a href="#','mypopup','1024','768','center','front');">Italy - A
lovely place</a>
<p>Since the old Rome, Italy and its habitants are always a
reliable ...</p>
</td>
<td class="tdEven left">
<p>Friday 08.02.2008</p>
<p>10:00 - 11:00 (<a href="#">UK</a>)</p>
</td>
<td class="tdEven left">
<p>Live webinar</p>
</td>
<td class="tdEven left">
<p>Upcoming</p>
<p>4 viewers</p>
<p><a href="#">Register</a></p>
</td>
<td class="tdEven left">
<p>Claudio Marcobello</p>
</td>
</tr>
<tr>
<td colspan="6" class="divider">&nbsp;</td>
</tr>

I am having a hard time figuring out how to add my custom classes to
the correct <td> elements.
How is this done? How do i do it for alternating TDs? And, finally,
how do I add the final divider
class?

I am doing everything from the server. I am using a stored procedure
to produce data and then am binding it according to the column name
created in the sproc. My datagrid looks like this:

<form id="Form1" runat="server">

<asp:DataGrid
runat="server" id="MyDataGrid"

AutoGenerateColumns="True"
width="750"
PageSize="10"
AllowPaging="True"

OnPageIndexChanged="MyDataGrid_Paging"

AllowCustomPaging="True">
<HeaderStyle
CssClass="tdHead left" />

<AlternatingItemStyle />
</asp:DataGrid>
</form>

Could somebody tell me how to achieve the posted HTML in my
datagrid????

Thanks!
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,828
Latest member
LauraCastr

Latest Threads

Top