Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i try to add dropdown in repeater

ASP.NET
<div class="CSSTableGenerator">
  <table border="0" width="100%" cellpadding="0"
cellspacing="0" id="results">
  <asp:Repeater ID="Repeater2" OnItemCommand="Repeater2_ItemCommand" runat="server">
  <HeaderTemplate>
  <tr>
 
  <td>
  DocumentID
  </td>
  <td>
  DocName
  </td>
  <td>
  File Name
  </td>
  <td>
  Document
  </td>
  <td>
  Department
  </td>
  <td>
  Status
 
  </td>
 
  </tr>
  </HeaderTemplate>
  <ItemTemplate>
  <tr>
 
  <td>
  <asp:Label Id="DocId" runat="server"></asp:Label>
  <%#DataBinder.Eval(Container.DataItem, "DocID")%>
  </td>
  <td>
  <asp:Label Id="DocName" runat="server"></asp:Label>
  <%#DataBinder.Eval(Container.DataItem, "DocName")%>
  </td>
  <td>
  <asp:Label Id="Uploadfile" runat="server"></asp:Label>
  <%#DataBinder.Eval(Container.DataItem, "Uploadfile")%>
  </td>
  <td>
  <asp:Label Id="DocType" runat="server"></asp:Label>
  <%#DataBinder.Eval(Container.DataItem, "DocType")%>
  </td>
  <td>
  <asp:Label Id="DepType" runat="server"></asp:Label>
  <%#DataBinder.Eval(Container.DataItem, "DepType")%>
  </td>
  <td>
  <asp:Label ID="Label1" runat="server"
Text='<%# Eval("ApproveID") %>' Visible = "false" />
  <%#DataBinder.Eval(Container.DataItem, "ApproveID")%>
  </td>
 
  </tr>
 
 
  <asp:Label ID="lblCountry" runat="server"
Text='<%# Eval("ApproveID") %>' Visible = "false" />

  <asp:DropDownList ID="DropDownList4" runat="server"

 EnableViewState="true" class="vpb_dropdown"

DataTextField="ApproveType"

DataValueField="ApproveID" AutoPostBack="true"

OnSelectedIndexChanged="DropDownList4_SelectedIndexChanged">

  <asp:ListItem Text="Pending" selected="selected"
 Value="3"></asp:ListItem>

  <asp:ListItem Text="Approve"
 Value="1"></asp:ListItem>

  <asp:ListItem Text="Reject"
 Value="2"></asp:ListItem>
  </asp:DropDownList>
  </ItemTemplate>
  </asp:Repeater>
  </table>
 
  <asp:Label ID="apfi" runat="server" Text="Label"></asp:Label><br />
  <asp:Button ID="Button4" runat="server" Text="Button" onclick="Button4_Click" />
 
  </div>
  </div>
  </center>
  </div>


it shows me like this
http://i40.tinypic.com/v7rqxg.png[^]
Posted
Updated 7-Nov-13 22:28pm
v2
Comments
This is due to some css issues. Please try to correct them.
You can use Developer tools like FireBug in Firefox to check what css are exactly affecting the Dropdown by selecting it.
Diya Ayesa 8-Nov-13 12:29pm    
i don't think so...because is css is perfectly fine
Have you checked with the Developer tool?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900