473,396 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Repeater/DataBinder Question

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!


Nov 18 '05 #1
2 1258
> 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)


Not a direct answer, but instead of using a TD with a 'header' class, you
could consider using a caption tag and style it via CSS:

http://www.w3schools.com/tags/tag_caption.asp

-Darrel
Nov 18 '05 #2
Thank you!!
Why have I never heard of this "caption" tag!!?? hahah

"Darrel" <no*****@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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)


Not a direct answer, but instead of using a TD with a 'header' class, you
could consider using a caption tag and style it via CSS:

http://www.w3schools.com/tags/tag_caption.asp

-Darrel

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Fraggle | last post by:
I am using PlaceHolders in a Repeater to generate a multi choice survey. I need a way of testing to see what the placeholder has been turned into at runtime, and reading out the data. The admin...
1
by: Viktor Popov | last post by:
Hi, I'm trying to do the following: I use a repeater control in ASP.NET/C# because I would like to show the content of one DataSet which is filled from SELECT QUERY. In DataSource I have the...
3
by: Andrew | last post by:
Hi, I am working on a questionnaire. I have displayed a questionnaire using a repeater control. The itemtemplate is as below (quite cut down): <ItemTemplate> <tr><td> <%#...
0
by: erin.sebastian | last post by:
Hello All, I have created a web page. At the top of the page there are 4 links; upon clicking on one of the links it brings up the left hand side menu, it's a repeater that loops through items...
0
by: uncensored | last post by:
Hello everyone, I'm fairly new at .Net and I have a repeater inside a repeater problem. I will attach my code to this message but basically what I am able to tell when I run my page it tells me...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.