repeater

Asp.NET: UserControl's BubbleEvent not being handled by repeater or page

I have a user control inside of a repeater. The user control has an ImageButton, which when clicked, should raise an event to the page which will handle the event: //Button onClick event in user control protected void btnOpenOption_Click(object sender, ImageClickEventArgs e) { RaiseBubbleEvent(sender, e); } The following are two ...

Control scope within Repeater, with and without UpdatePanel

Why does the following give me a compilation error for line B (Label2, outside UpdatePanel) but not for line A (Label1, inside UpdatePanel)? I would have expected both lines to give an error since both controls are within the same Repeater and should therefore not be directly accessible outside the repeater, since there is no one unique ...

How to set DropDownList's selected value inside a Repeater?

I need to create a group of DropDownLists to show and allow change of a property group for an item. I have the following code on my ASP page. <asp:Repeater runat="server" ID="repeaterProperties"> <ItemTemplate> <p><asp:DropDownList runat="server" ID="ddProperty" OnInit="ddProperty_OnInit" /><p> </ItemTemplate> </asp:Rep...

ASP.NET Repeater Template, Conditional Code for every Nth element

I'm using an asp.net repeater to create a bunch of images. The image markup is all the same so the standard <ItemTemplate> is fine. However, I want to wrap K images in a div. Lets say I bind 25+ images to the repeater and I want 5 images per div. How do I go about conditionally creating the start and close tags for the div? Is this a...

User Controls in Repeater

I have a usercontrol that provides voting buttons (for a SO type voting model) - it contains a private int member that retains the id of the record. Outside a repeater, it functions just fine - postbacks work, and the correct id is retained in the user control. Inside the repeater, an itemdatabound event handler associates the correct ...

UpdatePanel in Repeater

I have a UserControl which contains voting buttons inside an UpdatePanel, and outside a Repeater, it works perfectly. In the repeater, clicking the button fires off the appropriate event. That event is supposed to update the text of a control within the User Control, and that update should be reflected when the UpdatePanel refreshes. If...

Why does my repeater keep crashing on Eval(NULL) values?

<asp:Repeater ID="rptLessons" runat="server"> <ItemTemplate> <tr> <td><%#Eval("fullname")%></td> <td><%#isCompleted(Eval("totallessons"), Eval("completedlessons"), Eval("totalNumAvail"), Eval("totalNumCorrect"))%></td> <td><%#FormatPercent(Eval("totalnumcorrect") / Eval("totalNumAvail"))%>...

Nested Gridview in Repeater control

Hi I've a gridview control nested within a repeater control the repeater control is databound on pageload and in the itemdatabound event I look for the gridview control If e.Item.ItemType = ListItemType.Item Then Dim gvw As GridView = DirectCast(e.Item.Controls(3), GridView) gvw.DataSource = GetData() gvw.DataBind() End ...

Repeater ItemDataBound Complete Trigger

Hi I have a Repeater and I am doing various things during the ItemDataBound event. My Repeater is in a control. What I am noticing is that the things that are supposed to happen in the ItemDataBound event happen after the Page_Load of the page hosting the control. Is there a way to use some sort of ItemDataBoundComplete trigger so I c...

updateing business object when selected index changes for drop down list with in a data bound control

Hello Friends, I have a repeater, which is bound to a Business Object, containing a textbox (Name) and a DropDownList (Date of Birth). how can i edit the bound object with the selectedvalue from the dropdown? For example The first Object has these values (Name: Dave, DOB: 1982) The second object has these values (Name: Tim, DOB: 1970...

Retrieve the value of td in repeater

I have a Repeater that contains a Table. I want to hide the some tablecells of the table in repeater item template Here is the ASPX source code: <ItemTemplate> <table style="width: 100%" align="center"> <tr> <td style="width: 60px;" align="center"> <img src="upload/companylogo/<%# Eval("companylogo") %>" /> <...

I want to show a column once and then again if it changes, is it possible?

In a repeater is it possible to have a field only show once and then again if it changes? What I want it to look like Audio - Thing - Thing - Thing Video - thing - thing Picture - thing They are going to be ordered by Type either audio video picture but I don't want to have repeat Audio Video Picture as well. Thanks ...

Rebind Repeater using Next / Previous buttons in the ItemTemplate of the same Repeater

Sorry if this post appears to be long winded. I have a parent repeater with nested repeaters. My problem is I am trying to use 'Next' and 'Previous' buttons to rebind my repeater (rptTabContent) and thus the inner repeaters also, but when I try to manipulate the state of these links during the ItemCommand event they are overwritten by ...

How do I add blank rows to a repeater bound to a List<T>?

Is this possible? Using VB.NET. Can I do it in the footer maybe? Would that be the best way? Bind the footer to a datatable and throw some blank rows in there? ...

How to find controls in a repeater header or footer

I was wondering how one would find the controls in the HeaderTemplate or FooterTemplate of an Asp.Net Repeater control. I can access them on the ItemDataBound event, but I was wondering how to get them after (for example to retrieve a value of an input in the header/footer). Note: I posted this question here after finding the answer ju...

How to only display certain images in a folder into a Repeater in ASP.NET

I have a Repeater that takes all my images in a folder and display it. But what code changes must i make to only allow lets say Image1.jpg and Image2.jpg to be displayed in my repeater. I dont want the repeater to display ALL the images in my folder. My Repeater <asp:Repeater ID="repImages" runat="server" OnItemDataBound="repImages_Ite...

Testing a Container.DataItem with inline code

I would like to do something like this in ASP.Net 2.0: <asp:Repeater id="myRepeater" runat="server"> <ItemTemplate> <% if (DataBinder.Eval(Container.DataItem, "MyProperty").Equals("SomeValue")) { %> <%#DataBinder.Eval(Container.DataItem, "MyProperty")%> <% } %> </ItemTemplate> </asp:Re...

ASP.NET Repeater Paging/Sorting

So what's the real story on how to do this. All of the examples I find use Default Paging (HOW does anybody find that acceptable???) but I want to use custom paging. I can't use a GridView because I need more flexibility. The examples I see all use the PagedDataSource class but I can't find one that uses Custom Paging. Am I doomed to...

ASP.NET Repeater item in a subclass

Here's how I pull a field from my object: <%# DataBinder.Eval(Container.DataItem, "Name") %> However, how do I pull a field if it's in a subclass (Customer.ContactInfo.Name)? ...

Asp.Net binding SQL data to a repeater?

I am trying to bind data from SQL to a repeater control. I have tried what I usually do for a Gridview and it doesn't work. I would like to see an example whether it be using an SQLAdapter or using ExecuteReader from a command. Thank you! string sql = "SELECT [WallPost], [DatePosted] FROM [WallTable] WHERE [UserId] = '" + Request["frie...