Questions tagged [repeater]

The Repeater control is used to display a repeated list of items that are bound to the control.

The ASP.NET Repeater is a basic container control that allows you to create custom lists from any data available to the page. It's a handy control, especially since most ASP.NET pages that display data need to repeat the same kinds of data over and over.

2797 questions
26
votes
5 answers

Can't find control within asp.net repeater?

I have the following repeater below and I am trying to find lblA in code behind and it fails. Below the markup are the attempts I have made:
Xaisoft
  • 45,655
  • 87
  • 279
  • 432
25
votes
3 answers

Accessing Textboxes in Repeater Control

All the ways I can think to do this seem very hackish. What is the right way to do this, or at least most common? I am retrieving a set of images from a LINQ-to-SQL query and databinding it and some other data to a repeater. I need to add a…
Jason
  • 11,435
  • 24
  • 77
  • 131
24
votes
2 answers

How to access the properties of a Repeater's children in QML?

Can you tell me for below code that is there any way to change the imgx element properties. I have to change imgx.x value using javascript. Or is there any other way? I search qt docs but not helpfull. Thanks. Row { Repeater { id:mmm …
serkan gezer
  • 429
  • 1
  • 5
  • 8
23
votes
5 answers

force a string to 2 decimal places

i have a repeater item that displays a double. occasionally the double seems to be coming out with 3 decimal places like this 1165.833. im trying to force it to two decimal places by wrapping it in a string.format method but it still comes out the…
phili
  • 385
  • 2
  • 5
  • 11
20
votes
3 answers

How to do AsyncPostBackTrigger for the LinkButton in the Repeater

In my page, I have an LinkButton inside repeater, but the UpdatePanel cannot find the LinkButton to AsyncPostBackTrigger. Here is mycode.aspx
user1128331
  • 707
  • 4
  • 10
  • 20
20
votes
12 answers

ASP.Net repeater Item Command not getting fired

OK, I've used repeaters literally hundreds of times without problems but something has gone awry today. I have a repeater and I'm subscribing to the itemCommand event, but when my command runs, the page posts back but the event isn't fired. To get…
Ciaran O'Neill
  • 2,572
  • 6
  • 34
  • 40
19
votes
4 answers

Insert table in a single cell inside repeater

I am trying to build a table structure using asp.net Repeater like this below: column 1 | Column 2 Row1 cell1 cell2 --------------------------------------- TABLE 1 TABLE 2 …
Glory Raj
  • 17,397
  • 27
  • 100
  • 203
17
votes
8 answers

How to count the total number of rows in a ACF repeater output

Question: How do you simply count the rows in the output of an ACF repeater field? Goal: to make the output look different with a css class when there's only one row, vs. more than one row. My code: if( have_rows('testimonials')) { $counter =…
Robert
  • 744
  • 1
  • 5
  • 15
17
votes
6 answers

How to create a three column table in ASP.Net Repeater

I would like to be able to use the ASP.Net Repeater control to create an HTML Table that has three columns and as many rows as necc. For example if the Data were to look like this "Phil Hughes" "Andy Petite" "CC Sabathia" "AJ Burnett" "Javier…
etoisarobot
  • 7,684
  • 15
  • 54
  • 83
15
votes
3 answers

How do I bind a repeater to a List to also update the bound items? (2-way)

If I have a List < Person > where person is defined by the class class Person { string Forename { get;set; } string Surname { get; set; } } And I bind it to an asp repeater control that looks like this:
ilivewithian
  • 19,476
  • 19
  • 103
  • 165
15
votes
4 answers

Using DataBinder.Eval() in style attribute of an asp.net control

I've a asp.net linkbutton inside asp.net repeater control which renders multiple link buttons. I want to set the style of each and every linkbutton dynamically. I'm trying style="color:#6D7B8D;font-size:<%# DataBinder.Eval(Container.DataItem,…
NLV
  • 21,141
  • 40
  • 118
  • 183
15
votes
2 answers

User Control Inside Repeater

I have a UserControl inside a repeater. The repeater's datasource is from SQL Server. User Control's .cs - MoviePanel.ascx.cs: public int myMovieID { get; set; } public string myMovieName { get; set; } public string myMovieDescription { get; set;…
user1220169
  • 805
  • 2
  • 9
  • 14
14
votes
5 answers

how to bind dropdownlist which is inside repeater?

I want to bind dropdownlist which is inside a repeater.my code is
Ram Singh
  • 6,664
  • 35
  • 100
  • 166
14
votes
1 answer

Using an ASP.NET repeater with an array?

This may be a silly question but I was writing a quick test page and realised that I didn't know how to bind an array or ArrayList of strings, for example, to an ASP.NET Repeater. I experimented a bit.
Rob Stevenson-Leggett
  • 35,279
  • 21
  • 87
  • 141
14
votes
3 answers

Why are there no LINQ extension methods on RepeaterItemCollection despite the fact that it implements IEnumerable?

Why are there no LINQ extension methods on RepeaterItemCollection despite the fact that it implements IEnumerable? I'm using Linq to objects elsewhere in the same class. However, when I attempt to do so with the RepeaterItemCollection they aren't…
FrankTheTank
  • 2,133
  • 2
  • 14
  • 8