Repeater/DataBinder Question

G

George Durzi

Here's my asp:Repeater

<asp:Repeater ID="rptHelpDeskSystemStatus" Runat="server">
<HeaderTemplate>
<table width="100%" border="0" class="datatable">
<tr class="item">
</HeaderTemplate>
<ItemTemplate>
<td align="center">
<asp:Label ID="lblService" Runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.Service").ToString()%>'/>
<br/>
<asp:Image ID="imgStatus" Runat="server"
ImageUrl='<%#string.Concat("../img/SystemStatus_",
DataBinder.Eval(Container, "DataItem.Status").ToString(), ".gif")%>'/>
</td>
</ItemTemplate>
<FooterTemplate>
</tr>
</table>
</FooterTemplate>
</asp:Repeater>

I'd like to add a header row in my HeaderTemplate, the problem is, I have to
set a ColSpan on it based on the number of rows in my DataSet (the
DataSource of my Repeater)

So I'd like my HeaderTemplate to look like this:
<HeaderTemplate>
<table width="100%" border="0" class="datatable">
<tr class="header">
<td colspan='<%# %>'>
</tr>
<tr class="item">
</HeaderTemplate>


<td colspan='<%# %>'> .... How can I get the number of rows in my datasource
into here...

I looked up DataBinder.GetPropertyValue ... but I can't find an enumeration
of the property names.


Thank You!
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top