repeater

nested repeater pass value in header template

Hello, I have a nested repeater and i want to pass value in its header. here is my code so far.. The main problem is the id of the control in header template is also coming from code behind. <asp:Repeater ID="RptrProgCategory" runat="server"> <ItemTemplate> <asp:Repeater ID="RptrPrograms" runat="server"> ...

How to use databind records in inline if statements.

Hi everyone, here is my problem: I've got a repeater on my asp.net (VB): <asp:Repeater ID="Repeater1" runat="server"> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("Question_Number") %>' /> <%#Eval("Question_Desc")%> Now what I want to do is, check a value that I haven't used called "Question_Type" whic...

ASP.NET: Reusing the same Repeater ItemTemplate

I'm currently using a certain ItemTemplate for three repeaters that are all on the same page, but they are all bound to different data sources. Is there any way to refactor my web form without using a user control to easily refer to this template so I will only have to define it once? ...

Creating/Handling events for controls when added during runtime.

I am using a Repeater which contains a placeholder. The placeholder is bound to my database and each ItemTemplate contains 1-6 radiobuttons depending on what the database returns. What I need to do is somehow keep track of which one of the radiobuttons is checked for each question so I can write the user's answers to the database when t...

Set Custom ASP.NET UserControl variables when its in a Repeater

<%@ Register Src="~/Controls/PressFileDownload.ascx" TagName="pfd" TagPrefix="uc1" %> <asp:Repeater id="Repeater1" runat="Server" OnItemDataBound="RPTLayer_OnItemDataBound"> <ItemTemplate> <asp:Label ID="LBLHeader" Runat="server" Visible="false"></asp:Label> <asp:Image ID="IMGThumb" Runat="server" Visible="false"></asp:Image> ...

databinding expression in asp.net

Hi All, I have an VS2005 ASP.Net page with a repeater on it of Customers. The following shows up in the of the repeater: <span><%# Eval(GetAdLinks((Customer)Container.DataItem)) %></span> The GetAdLinks is a protected mehtod in the code behind which returns a control represented as a string. Is this possible? I'm getting an error ...

How can I execute an insert with data from a repeater-generated form whose data source is SQL?

I'm storing multilingual data in a database whose model is language normalized (like this). For this particular problem the key for the table in question consists of a value entered by the user and a language from the language table. I'd like to dynamically generate a form with input fields for all available languages. The user inputs...

Get the row changed in repeater

Hey, I've got a repeater which is placed inside an updatepanel. When the user enters a new value, the repeater is updated without a postback. Is it possible to get the row that was updated in JQuery so that I can place an effect on it to make the change less subtle? For example, I'd like to fade a new color in on just the row that was...

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 textbox to each item in the repeater that will let the user change the title of each image, ver...

UpdatePanel not refreshing in Accordion

Hi, I'm using MS AJAX's accordion control. It works fine normally, but I can't seem to get it to work with an UpdatePanel. My layout is like this: <div id="accordion"> <div><a href="#">Header1</a></div> <div class="acc_content"> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" > ...

Uncheck all checkboxes in repeater except checkbox being checked

I know my question reads a bit like that 'how much wood can a woodchuck chuck' line, please excuse that... I have a repeater with checkboxes. There are numerous rows in this repeater - I never know how many - I want only one checkbox checked at any time. If the user changes the checked checkbox, any pre-existing checks are unchecked th...

Button in a Repeater does not fire ItemCommand

Why would a button inside a Repeater not fire the Repeater's ItemCommand event? Is there a way to force it to do so? ViewState is Enabled. In the code below, btnApprove and btnDelete are the buttons in question: <asp:Repeater runat="server" ID="rpt1" onitemdatabound="rpt1_ItemDataBound" onitemcommand="rpt1_ItemCommand" > <ItemTempl...

How can I access the group of a linq group-by query from a nested repeater control?

I'm using a linq group by query (with two grouping parameters) and would like to use the resulting data in a nested repeater. var dateGroups = from row in data.AsEnumerable() group row by new { StartDate = row["StartDate"], EndDate = row["EndDate"] }; "data" is a DataTable from an SqlDataAdapter-filled DataSet. "dateGroups" is us...

How to separate the repeater data by number of items.

For example, we have 19 items on the repeater datasource. And we wanted to separate them using by 5 items. It's like 01 02 03 04 05 <br /> 06 07 08 09 10 <br /> 11 12 13 14 15 <br /> 16 17 18 19 How are we going to do this in asp.net repeater? Thanks. ...

Repeater itemdatabound event value type and reference type

Im trying to bind a list with datetime objects to my repeater. if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) { DateTime actualDate = e.Item.DataItem as DateTime; } When I want access the itemdatabound event on the repeater Then I get an errorme...

Can I use loops in repeater? Is it recommended?

My datasource has an Rating dataItem contains an integer from 0 to 5. I'd like to print stars accordignly. I'm trying to do it within Repeater control: <b>Rating:</b> <% for (int j = 1; j <= DataBinder.Eval(Container.DataItem, "Rating"); j++) { %> <img src="App_Pics/fullstar.png" /> <% } for (int j = 1; j <= 5 - DataBinder.Eval(Conta...

Can I place a asp:datalist inside a repeater control and databind it?

Hi folks, Can I place a asp:datalist inside a repeater control and databind it for each time its repeated? Using VB.NET btw.. Cheers! --Jonesy ...

Allow repeater to be arranged using drag-drop

Hey all, I have a repeater that's bound to a SQL Data Source (using ASP.NET). Are there any JQuery plugins/efficient way of converting my repeater into something that can be sorted via drag and drop? i.e. users can rearrange the order of the data, which updates the database? Thanks ...

ASP.NET/VB.NET problem solving help!

Hi folks, Got a problem I need help with. Basically I'm gonna develop a form (part of a bigger web app) that lists a load of clients and there business contact, tech contact 1, and tech contact 2. The idea is rapid data entry. So one form shows each client with their contacts in dropdowns and I we can change each one then click a save...

Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

Hey I am getting the following error Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. but all I am trying to do is inside a ASP.NET REPEATER Control <% if ( Eval("Message").ToString() == HttpContext.Current.Profile.UserName) %> <% { %> <asp:ImageButton runat="...