repeater

ASP.Net: why is my button's click/command events not binding/firing in a repeater?

Here's the code from the ascx that has the repeater: <asp:Repeater ID="ListOfEmails" runat="server" > <HeaderTemplate><h3>A sub-header:</h3></HeaderTemplate> <ItemTemplate> [Some other stuff is here] <asp:Button ID="removeEmail" runat="server" Text="X" ToolTip="remove" /> </ItemTemplate> </asp:Repeater> And in th...

Nesting a GridView within Repeater

I have a scenario wherein, for example, I need to repeat a list of US states and display a table of cities and city populations after the name of each state. The design requirement dictates that every outer repetition must be the name of a state followed by a table of cities, and that requirement cannot be changed at this time. Are there...

ASP.NET ObjectDataSource Binding Automatically to Repeater - Possible?

Hi, I have a Question class: class Question { public int QuestionNumber { get; set; } public string Question { get; set; } public string Answer { get; set; } } Now I make an ICollection of these available through an ObjectDataSource, and display them using a Repeater bound to the DataSource. I use <%#Eval("Question")%> t...

Programmatically accessing Data in an ASP.net 2.0 Repeater

This is an ASP.Net 2.0 web app. The Item template looks like this, for reference: <ItemTemplate> <tr> <td class="class1" align=center><a href='url'><img src="img.gif"></a></td> <td class="class1"><%# DataBinder.Eval(Container.DataItem,"field1") %></td> <td class="class1"><%# DataBinder.Eval(Container.DataItem,"field2") %></td> ...

Is there a way to asynchronously filter an IList?

Ok, so there has to be a way to do this... no? If not I'd love some ideas. I have two repeaters and an image inside an update panel along with some AJAX dropdowns with link buttons to the left. I want to update the data inside the update panel as fast as possible as values are selected from the dropdowns. What do you think would be t...

Cleanest way to implement collapsable entries in a table generated via asp:Repeater?

Before anyone suggests scrapping the table tags altogether, I'm just modifying this part of a very large system, so it really wouldn't be wise for me to revise the table structure (the app is filled with similar tables). This is a webapp in C# .NET - data comes in from a webservice and is displayed onscreen in a table. The table's rows...

I need populate a repeater with pseudo-related data

Before I do this I figured I would ask if it was the best way. Each "Vendor" object has a "Bucket" object. In my repeater I need to display some properties from Vendor and some from Bucket, also some images populated by FileSystem that are linked to the vendor. I figured the best way to do this is bind the repeater with the vendor object...

Dynamically adding controls in ASP.NET Repeater

I find my self having a repeater control which is being databound to an xml document. My client is now requesting that the Textbox's which are being repeater can be either a Textbox or a Checkbox. I cannot seem to find an easyway to essentially do the following: if ((System.Xml.XmlNode)e.Item.DataItem.Attributes["type"] == "text") <asp...

ASP.NET OleDbConnection Problem

I'm working on an ASP.NET website where I am using an asp:repeater with paging done through a VB.NET code-behind file. I'm having trouble with the database connection though. As far as I can tell, the paging is working, but I can't get the data to be certain. The database is a Microsoft Access database. The function that should be acces...

ASP.NET Repeater ItemDataBound happening AFTER PreRender event?

I have a repeater control on an ASP.NET 2.0 web form. As I understanding it, all of the page's data-bound controls fire their binding events somewhere in between the Page_Load and the Page_PreRender events. However, my repeater's ItemDataBound event appears to be happening AFTER the PreRender event. How is this so and is there any ...

Model View Presenter and Repeater

I'm building an application using the Supervising Controller pattern (Model View Presenter) and I am facing a difficulty. In my page I have a repeater control that will display each item of a collection I am passing to it. The reapeater item contains 2 dropdown list that allow the user to select a particular value. When I click the next ...

How to add controls to ItemTemplate (Repeater) at run time?

I'm desinging a rich repeater control which needs some controls (specifically just an unordered list) added to it at runtime. The solution I've opted for is to inject the nesseccary markup, onInit, into the header, item and footer templates respectively. I can get the templates out (using InstantiateIn) and then add the markup as needed,...

How to create conditional content within a databound Repeater

Hi All, I'm setting up a User Control driven by a XML configuration. It is easier to explain by example. Take a look at the following configuration snippet: <node> <text lbl="Text:"/> <checkbox lbl="Check me:" checked="true"/> </node> What I'm trying to achieve to translate that snippet into a single text box and a checkbox contr...

Editable Datagrid? Repeater?

I've got a list of items in an order to show in asp.net -- each item (row) will have 3 textboxes so the user can both view and change that piece of data (shipping cost, handling cost, price). What would be one "recommended" way to accomplish this? With a repeater, I assume I'd then have to loop through the form values on postback, and ...

Formatting DataBinder.Eval data

How can I format data coming from a DataBinder.Eval statement in an ASPX page? For example, I want to display the published date of the news items in a particular format in the homepage. I'm using the ASP.NET 2.0 Repeater control to show the list of news items. The code for this goes like this: <asp:Repeater ID="Repeater1" runat="serv...

Strange Error - CS0012: The type x is defined in an assembly that is not referenced.

The type 'x' is defined in an assembly that is not referenced. You must add a reference to assembly 'abc123'. I have a .NET 2.0 web application that references my assembly 'abc123'. The assembly exists in the GAC and I've verified that it is the correct(same) version. The rest of application has no issues except for one .aspx page. T...

How to find checked RadioButton inside Repeater Item?

I have a Repeater control on ASPX-page defined like this: <asp:Repeater ID="answerVariantRepeater" runat="server" onitemdatabound="answerVariantRepeater_ItemDataBound"> <ItemTemplate> <asp:RadioButton ID="answerVariantRadioButton" runat="server" GroupName="answerVariants" Text='<%# DataBinder.Eva...

Retrieving sibling control from Repeater on event

I have a DropDownList on a repeater control, as well as a button. The button is disabled until a valid item is selected on the DropDownList, when I want to enable the button. Unfortunately I can't seem to get to it. Found the repeater by: (.As() method is an extension method for (object as T), just makes casting easier) sender.As<Cont...

How can I hide a repeater in ASP.NET C# if the DataSource contains no items?

I have an ASP.NET page that uses a repeater nested within another repeater to generate a listing of data. It's to the effect of the following: <asp:Repeater> <ItemTemplate> <span><%#Eval("Data1") %></span> <!-- and many more --> <asp:Repeater DataSource='<%#Eval("Data2")%>'> <HeaderTemplate> ...

ASP.NET: Setting the Style of an HTML element Programatically

Hi! I'm generating a menu with a Repeater control bound to an XmlDataSource. <asp:Repeater ID="myRepeater" runat="server" DataSourceID="myDataSource" onitemdatabound="myRepeater_ItemDataBound" onitemcreated="myRepeater_ItemCreated"> <HeaderTemplate> <ul class="menu_list"> </HeaderTemplate> <ItemTemp...