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.

2759 questions
8
votes
1 answer

How to dynamically set control IDs inside a repeater template?

Here is a perplexing issue I have not seen a good answer to on StackOverflow, although there a couple stabs at it... I have a situation where I'd like to do this:
Bryan
  • 8,640
  • 7
  • 36
  • 60
8
votes
2 answers

Losing value when clicking on button in ascx control that is rendered in asp:Repeater

I created a asp:Repeater that I fill with .ascx controls: protected void Page_Load(object sender, EventArgs e) { Repeater1.DataSource = listOfData; Repeater1.DataBind(); } On page I have:
1110
  • 7,801
  • 45
  • 156
  • 303
8
votes
2 answers

SelectedValue of DropDownList in Repeater

How do I set the selected item of a dropDownList inside a repeater? The repeater is bound to the repeaterData DataTable and the dropDownList is bound to dropDownList DataTable in the code behind. I need to set the SelectedValue property of the…
dmr
  • 19,157
  • 34
  • 91
  • 136
7
votes
3 answers

nested dictionary to nested repeater asp.net c#

I'm making an asp.page that will display hierarchical information about company assets. To grab the data I used a lambda expression: FASAssetInfoDataContext fasInfo = new FASAssetInfoDataContext(); var data = from g in…
Marco
7
votes
2 answers

ASP.Net - Getting data from RepeaterItem

I'm pretty new to ASP.Net and I'm not sure I'm going about this the right way. I have a Repeater which is bound to a list of "Image" objects. Within each RepeaterItem is a checkbox and I have a button OnClick event, which I want to display some…
Ant P
  • 23,644
  • 4
  • 62
  • 103
7
votes
2 answers

Maintaining viewstate of a repeater

I have a problem whereby the viewstate of a repeater i.e. the controls within the repeater are not maintaing their viewstate. I have the following: Repeater 1:
higgsy
  • 1,961
  • 8
  • 29
  • 45
7
votes
4 answers

Testing a Container.DataItem with inline code

I would like to do something like this in ASP.Net 2.0: <% if (DataBinder.Eval(Container.DataItem, "MyProperty").Equals("SomeValue")) { %> …
Filini
  • 2,041
  • 2
  • 22
  • 32
7
votes
2 answers

asp.net: How to find repeater div in backend?

I use repeater to display records fetching from database, especially I use div tag to display html content stored in datatable. But I don't know how to find the div in backend. In Repeater_ItemDataBound event I can use Control…
Steven Zack
  • 4,554
  • 19
  • 52
  • 84
7
votes
3 answers

How to nest repeaters in asp.net

I need to know how to nest repeaters within a user control. The html side of things is fine, it's the binding and code behind I need help with. I've only been able to find examples using an sql data source, which doesn't really help. My repeaters…
Nathan
  • 909
  • 1
  • 18
  • 33
7
votes
3 answers

Determine the repeater row count in asp.net

How i can determine the amount of rows which display in this repeater at once?
samar
  • 71
  • 1
  • 1
  • 2
7
votes
2 answers

Update Panel and triggers from a repeater control

Hi I found code similiar to the following online. It's seems really great for getting a button buried in a repeater control to trigger a full cycle back to the server.
Coder 2
  • 4,441
  • 12
  • 36
  • 43
7
votes
3 answers

asp.net: Iterating over multiple repeater.items collections

I have a number of idential repeaters, and I need to iterate through all of the items. I currently have: For Each item In rpt1.Items ...do some stuff Next For Each item In rpt2.Items ...exact same code Next Is there a simple way to…
chris
  • 33,326
  • 50
  • 148
  • 232
7
votes
5 answers

How to dynamically refresh a .NET databound repeater control

I have a .NET repeater control that is data-bound to a List. As part of the Repeater's Item Collection, I have a "Remove Button" that effectively removes this current List element. This works, in code-behind I can successfully remove an item from…
Ash Machine
  • 8,770
  • 9
  • 43
  • 51
7
votes
2 answers

Is there any possibility to reach the index of an outer QML Repeater from the inner one (they are nested)?

I am trying to dynamically build a matrix of the same type of items in my QML application and keep it dynamic, so that you can change the number of rows and columns in a c++ file anytime. This has been working well, but now, to access them…
L. Srd
  • 81
  • 1
  • 3
7
votes
2 answers

Binding a Generic List of type struct to a Repeater

I've had a bit of a problem trying to bind a generic list to a repeater. The type used in the generic list is actually a struct. I've built a basic example below: struct Fruit { public string FruitName; public string Price; // string for…
Dal
  • 2,559
  • 2
  • 24
  • 29