Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > check for specific repeater value - can it be done?

Reply
Thread Tools

check for specific repeater value - can it be done?

 
 
Bob H
Guest
Posts: n/a
 
      03-03-2004
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


 
Reply With Quote
 
 
 
 
Patrice Scribe
Guest
Posts: n/a
 
      03-03-2004
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" <(E-Mail Removed)> a écrit dans le message de
news:c2536t$9gp$(E-Mail Removed)...
> 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
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to check all check boxes in repeater control kris ASP .Net 1 09-22-2005 07:16 PM
how to check all check boxes in repeater control kris ASP .Net 0 09-22-2005 06:29 PM
how to check all check boxes in repeater control kris ASP .Net 0 09-22-2005 06:29 PM
Re: How to check whether a list have specific value exist or not? Sidharth Kuruvila Python 0 04-09-2005 09:53 AM
How to check whether a list have specific value exist or not? praba kar Python 1 04-09-2005 09:46 AM



Advertisments