0
Reply

Dropdown list in repeater html probelm

Ask a question
scropio gurl

scropio gurl

10y
858
1
i try to add dropdown in repeater

code is
<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




  dropdown in image is above whereas i try to add dropdown in status column

where is the problem?