Advertisement

05.27.2008 at 11:21PM PDT, ID: 23437164
[x]
Attachment Details

ASP Repeater: Dropdown in HeaderTemplate

Asked by jason-d in Microsoft Visual Basic.Net, .Net Editors & IDEs, Visual Studio .NET 2005

Tags: .NET

Hi, i have a Data repeater with a head template with an add button and delete button for the data repeater.

I want to add a dropdown list containing values of 'Row x' with the same number of rows asdata repeater to delete the row. A confirmation box will then prompt the user to delete the row.

However, I cannot find a way to DataBind the dropdown list with a set of values programatically.

Is there a way to databind the dropdown in the HeaderTemplate automatically?

Thanks and Regards,
DStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
<asp:Repeater id="R" onitemcommand="R_ItemCommand" runat="server">
<HeaderTemplate>
<asp:Button ID="A" runat="server" CommandName="AddMe" Text="Add Line" />
<asp:Button ID="D" runat="server" CommandName="DelMe" Text="Delete" />
<asp:DropDownList id="L" Runat="server" />
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:TextBox Text='<%# Bind("ROW") %>' ID="ROW"runat="server" />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
[+][-]05.28.2008 at 05:50AM PDT, ID: 21659865

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, .Net Editors & IDEs, Visual Studio .NET 2005
Tags: .NET <asp:Repeater
Sign Up Now!
Solution Provided By: apeter
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.28.2008 at 02:09PM PDT, ID: 21664411

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628