473,406 Members | 2,698 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,406 software developers and data experts.

check for specific repeater value - can it be done?

Hi,

I've a data repeater on a form that gets populated from an SP. In the
repeater, I've a ItemTemplate row that outputs the field...

<td colspan="1">
<%# DataBinder.Eval(Container.DataItem, "FieldValue")%>
</td>

....Is there anyway to check the values in this Repeater field as it gets
populated so that I can replace it with another value?? Can it be done and
if so....any pointers please?

Many thanks.

Best regards

Bob
Nov 18 '05 #1
1 1237
See the ItemCreated event for the Repeater class (it will be easier if you
include the value in a control such as label).

Another option would be to change the value in your SQL query (I would
rather use the event when I want to highlight particular values).

Basically (untested) :

Sub Repeater1_ItemCreated(sender As Object, e As RepeaterItemEventArgs)
Dim Label as Label
Select Case e.Item.Type
Case ListItemType.Item,ListItemType.AlternatingItem
Label=e.Item.FindControl("MyLabel")
If Label.Text="Warning" Then
Lable.Text="WARNING"
Label.Font.Bold=True
End If
End Select
End Sub
--

"Bob H" <bh**@le.ac.uk> a écrit dans le message de
news:c2**********@south.jnrs.ja.net...
Hi,

I've a data repeater on a form that gets populated from an SP. In the
repeater, I've a ItemTemplate row that outputs the field...

<td colspan="1">
<%# DataBinder.Eval(Container.DataItem, "FieldValue")%>
</td>

...Is there anyway to check the values in this Repeater field as it gets
populated so that I can replace it with another value?? Can it be done and
if so....any pointers please?

Many thanks.

Best regards

Bob


Nov 18 '05 #2

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

Similar topics

3
by: WebMatrix | last post by:
I am struggling with implementing somewhat complicated UI web-control. I explored Repeater, but I am not sure if it's the best way to go. I am leaning towards writing my own custom control and...
1
by: fredda054 | last post by:
Hi everybody ! With help from some nice people here I'm getting close to solve my problem with dbnull values in a repeater. I got it pretty much done, I just ned to fix some syntax. I get a...
1
by: ratnakarp | last post by:
Hi, I have a search text box. The user enters the value in the text box and click on enter button. In code behind on button click i'm writing the code to get the values from the database and...
2
maxamis4
by: maxamis4 | last post by:
Hello folks need some ideas here for a report that I am getting together. Here is the scenerio, currently we have an SLA that states that an external group transferring a problem to the internal...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.