repeater

ASP .NET - How to Iterate through a repeater ?

Hi, What I'm trying to do is iterate through a repeater and read some controls values: foreach (RepeaterItem iter in TablePanier.Items) { string guid = ((HiddenField)iter.FindControl("guid")).Value.ToString(); // nombre exemplaires du livre int nbExemplaires = int.Parse(((System.Web.UI.WebControls.TextB...

Error using ASP.NET 3.5 Chart control within a Repeater control

Hi, I'm getting the error "Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Error executing child request for ChartImg.axd" at runtime from my Chart control. I have read one solution to this error message as documented here: http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/thread/1dc4b352...

Add a grouping template to a ASP:Repeater that displays after any header template

I have sub classed a asp repeater similar to A Grouping Repeater All works fine apart from if I also have a <HeaderTemplate> </HeaderTemplate> The grouping template is rendered before the header template. I would really like to either be able to choose the order in which the templates are rendered or just have the <GroupTemplate> Rende...

Injecting table row inside repeater item

I am trying to inject inside repeaters items, the problem is that the row is generated in a wrong location. If you try this simple example, you will see that the rown is generated under label '2' as it should be generated under label '1'. Why does it happen? And how to fix that? protected void Page_Load(object sender, EventArgs e) { ...

Why is e.Item.DataItem null on ItemDataBound event when binding an asp:net Repeater to a Collection?

Hi, I'm trying to bind a collection implementing the ICollection, IEnumerable and IList interface to an asp.net repeater. The Collection is named CustomCollection. So I'm setting the datasource of the repeater to the collection, as follows: rptRepeater.DataSource = customCollection; rptRepeater.Databind(); Then, on the ItemDataBound ...

Repeater not repeating :0) (asp.net)(vb)

Morning stackoverflow, I have a repeater, with the following code in my aspx page; <asp:Repeater ID="Contactinforepeater" runat="server"> <HeaderTemplate> <h1>Contact Information</h1> </HeaderTemplate> <ItemTemplate> <table width="50%"> <tr> <td colspan="2"><%#Container.DataItem("position")%></td> </tr> <tr> <td>Name:</td> <td><%#Cont...

adding multiple <asp:Hyperlink>s into a repeater

I have a repeater control, and I want to put an unknown number of <asp:Hyperlink>s into the template, for example if you start with this: <asp:Repeater runat="server" ID="PetsRepeater"> <ItemTemplate> <%#DataBinder.Eval(Container.DataItem, "Owner")%> <%#this.ListPets(Container.DataItem)%> </ItemTemplate> </asp:Repeater> ...

Arraylist as repeater datasource (how to access from .aspx)

I have an arraylist: Dim downloadsarray As New ArrayList downloadsarray.Add(iconlink) downloadsarray.Add(imgpath) downloadsarray.Add(filesize) downloadsarray.Add(description) Which is the datasource of my repeater: DownloadsRepeater.DataSource = downloadsarray DownloadsRepeater.DataBind() P...

ASP.NET Repeater - Evaluate Item as int?

I'm trying to style a table row based upon a value in the databound collection (from LINQ to SQL) in my item template, however it's not working. This is what I have so far: <ItemTemplate> <% string style = String.Empty; if ((string)DataBinder.Eval(Quotes.Cu, "Status") == "Rejected") style = "color:red;"...

Nesting Repeater in Gridview: Hiding gridview row and repeater header if data is not there in repeater

Hello, I have nested a repeater control in Gridview. Right now it is showing gridview rows and repeater header for every case(whether data is there or not for that particular grid view row in the repeater control). I want to hide the gridview row and repeater control header when there is no data present for that particular gridview row....

Accessing Repeater DataItem in Button_OnClick event

Hello, I have a repeater control bound to a collection of objects. When I fire off the button_onclick event, I need to have access to the dataitem to get the object properties. Here is what I have and my question is how do I access the underlying objects in a repeater in a button_onclick event protected void OKButton_Click(object sende...

How do I change or add data to a data repeater and get it to display in ASP.NET

Here is my code-behind, this adds the "OakTreeName" to the datarepeater. There's about 200 of them. Dim cmd As New SqlClient.SqlCommand("OakTree_Load", New SqlClient.SqlConnection(ConnStr)) cmd.CommandType = CommandType.StoredProcedure cmd.Connection.Open() Dim datareader As SqlClient.SqlDataReader = cmd.ExecuteReader() OakTree_Thumb_R...

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: <asp:Repeater ID="MyRepeater" runat="server" OnItemDataBound="MyRepeater_ItemDataBound"> <ItemTemplate> <li id="id?"> All the other stuff </li...

ASP Repeater Evals mixed with HTML

I want to include HTML and Eval within a Repeater: <asp:Repeater ID="Rpt" runat="server" DataSourceID="DS"> <HeaderTemplate><div id="gallery"></HeaderTemplate> <ItemTemplate> <a href='<%# Eval("Url") %>' class="show"> <img src='<%# Eval("Image") %>' alt='<%# Eval("Title") %>' title="" runat=...

ASP.NET Repeater Causing JQuery Image Slider

I have a jquery Image slider in a content page that worked fine. Once I converted it into a asp repeater the first image of the repeater would display twice, then run normally. Any idea on why the repeater is causing this? I think I discovered that the first image link <ItemTemplate> <a href='<%#Eval("Url")%>'> <img src='<%#Eval("Im...

ASP.NET Repeater datasource bound to a function. Would it call the function twice?

In the code behind I have a function that returns a List(Of SomeClass): rptRepeater.DataSource = SomeFunction(SomeVariable) rptRepeater.DataBind() In the html I have a basic repeater layout and am using the below code to get the Properties of each object returned. <%#Databinder.Eval(Container.DataItem, "Parameter1")%> My question is...

Repeater and add columns to header and itemtemplate on page load

I haven't used repeaters for much more than showing data from a datatable. I am building a grid that that shows a list of users and columns of roles that the user has been assigned, shown with checkboxes (shown with true/false below but pretent they are checkboxes). ex. |Rep Name|Caller|Closer|Manager|SuperUser| |Bob           |True  ...

How can I make a list in a Repeater Section?

I need to create a repeater section that will show 4 columns - First Name, Last Name, a link based off of stored column data that says. All the data plus some extra not being used is in a players profile. How do I link the data on the code-behind to the repeater control with the databinders? I am using visual studio 2008, VB.NET for ...

How to set tab index of the first input element inside the first repeater Item?

Hi, I have an aspx form containing many individual controls like and one repeater control. The repeater control items are basically having dropdowns, textboxes etc. next to each other. My problem is I can set the tab index of each individual element easily but I don't know how to set the tab index of the first element in of the firs...

How to use value from primary accessdatasource control as parameter in select query for secondary accessdatasource control

Hi, I'm trying to display all orders placed and I have a primary accessdatasource control that has a select query to get the customer information and the orderID. I want to use the orderID value from this first query as a parameter for the secondary accessdatasource control that selects the product information of the products in the ord...