2014-12-29 3 views
0
<div id="div1" runat="server"> 
    <asp:UpdatePanel ID="UpdatePanel3" runat="server"> 
     <ContentTemplate> 
      <asp:Table ID="Table1" runat="server" border="0" CssClass="SupplierFormTable" HorizontalAlign="Center" Width="100%"> 
       <asp:TableHeaderRow> 
        <asp:TableHeaderCell HorizontalAlign="Left" ColumnSpan="8">  Approval Sequence  </asp:TableHeaderCell> 
       </asp:TableHeaderRow> 
       <asp:TableRow> 
        <asp:TableCell Width="22%"> 
        1. 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:DropDownList ID="drpdwnlst_Seq1" runat="server" Width="35%" AppendDataBoundItems="true"> 
          <asp:ListItem Text="--select--" Value="-1"></asp:ListItem> 
         </asp:DropDownList> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell Width="22%"> 
        2. 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:DropDownList ID="drpdwnlst_Seq2" runat="server" Width="35%" AppendDataBoundItems="true"> 
          <asp:ListItem Text="--select--" Value="-1"></asp:ListItem> 
         </asp:DropDownList> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell Width="22%"> 
        3. 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:DropDownList ID="drpdwnlst_Seq3" runat="server" Width="35%" AppendDataBoundItems="true"> 
          <asp:ListItem Text="--select--" Value="-1"></asp:ListItem> 
         </asp:DropDownList> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell Width="22%"> 
        4. 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:DropDownList ID="drpdwnlst_Seq4" runat="server" Width="35%" AppendDataBoundItems="true"> 
          <asp:ListItem Text="--select--" Value="-1"></asp:ListItem> 
         </asp:DropDownList> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell Width="22%"> 
        5. 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:DropDownList ID="drpdwnlst_Seq5" runat="server" Width="35%" AppendDataBoundItems="true"> 
          <asp:ListItem Text="--select--" Value="-1"></asp:ListItem> 
         </asp:DropDownList> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell Width="22%"> 
        6. 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:DropDownList ID="drpdwnlst_Seq6" runat="server" Width="35%" AppendDataBoundItems="true"> 
          <asp:ListItem Text="--select--" Value="-1"></asp:ListItem> 
         </asp:DropDownList> 
        </asp:TableCell> 
       </asp:TableRow> 
      </asp:Table> 
     </ContentTemplate> 
    </asp:UpdatePanel> 
</div> 

이 테이블은 div 태그 안에 있습니다.드롭 다운 선택을 기반으로 asp : TableRow 위치를 동적으로 설정합니다.

<div id="div_Approvals" runat="server"> 
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"> 
     <ContentTemplate> 
      <asp:Table ID="tbl_Approvals" runat="server" border="0" CssClass="SupplierFormTable" HorizontalAlign="Center" Width="100%"> 
       <asp:TableHeaderRow> 
        <asp:TableHeaderCell HorizontalAlign="Left" ColumnSpan="8"> 
        Approval            
        </asp:TableHeaderCell> 
       </asp:TableHeaderRow> 

       <asp:TableRow > 
        <asp:TableCell Width="22%"> 
         <asp:Label runat="server" ID="lbl_HiringManager" Text="Hiring Manager :"></asp:Label> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:DropDownList ID="drpdwnlst_HiringManagerName" runat="server" Width="35%"></asp:DropDownList> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_HiringManagerSignature" runat="server"></asp:TextBox> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_HiringManagerDate" runat="server" ReadOnly="true" Visible="false"></asp:TextBox> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell></asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_HiringManagerComment" runat="server" TextMode="MultiLine"></asp:TextBox> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:Button ID="btn_HiringManagerApprove" Text="Approve" runat="server" OnClick="btn_HiringManagerApprove_Click" /> 
         <asp:Button ID="btn_HiringManagerReApprove" Text="Re-Approve" runat="server" OnClick="btn_HiringManagerReApprove_Click" Visible="false" /> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow > 
        <asp:TableCell> 
         <asp:Label runat="server" ID="lbl_ReportingGroupExecutive" Text="Reporting Group Executive :"></asp:Label> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:DropDownList ID="drpdwnlst_ReportingGroupName" runat="server" Width="35%"></asp:DropDownList> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_ReportingGroupExecutiveSignature" runat="server"></asp:TextBox> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_ReportingGroupExecutiveDate" runat="server" Visible="false"></asp:TextBox> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell></asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_ReportingGroupExecutiveComment" runat="server" TextMode="MultiLine"></asp:TextBox> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:Button ID="btn_ReportingGroup_Approve" Text="Approve" runat="server" OnClick="btn_ReportingGroup_Approve_Click" /> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell> 
         <asp:Label runat="server" ID="lbl_ProgramOrProjectOwner" Text="Program/Project Owner (if applicable) :"></asp:Label> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:DropDownList ID="drpdwnlst_PPO_Name" runat="server" Width="35%"></asp:DropDownList> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_ProgramOrProjectOwnerSignature" runat="server"></asp:TextBox> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_ProgramOrProjectOwnerDate" runat="server" ReadOnly="true" Visible="false"></asp:TextBox> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell></asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_ProgramOrProjectOwnerComment" runat="server" TextMode="MultiLine"></asp:TextBox> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:Button ID="btn_PPO_Approve" Text="Approve" runat="server" OnClick="btn_PPO_Approve_Click" /> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell> 
         <asp:Label runat="server" ID="lbl_Finance" Text="Finance"></asp:Label> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:DropDownList ID="drpdwnlst_Finance" runat="server" Width="35%"></asp:DropDownList> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_FinanceSignature" runat="server"></asp:TextBox> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_FinanceDate" runat="server" ReadOnly="true" Visible="false"></asp:TextBox> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell></asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_FinanceComment" runat="server" TextMode="MultiLine"></asp:TextBox> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:Button ID="btn_Finance_Approve" Text="Approve" runat="server" OnClick="btn_Finance_Approve_Click" /> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell> 
         <asp:Label runat="server" ID="lbl_PresidentAndCOO" Text="President & COO (if applicable) :"></asp:Label> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:DropDownList ID="drpdwnlst_PresidentAndCoo_Name" runat="server" Width="35%"></asp:DropDownList> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_PresidentAndCOOSignature" runat="server"></asp:TextBox> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_PresidentAndCOODate" runat="server" ReadOnly="true" Visible="false"></asp:TextBox> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell></asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_PresidentAndCOOComment" runat="server" TextMode="MultiLine"></asp:TextBox> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:Button ID="btn_PresidentAndCoo_Approve" Text="Approve" runat="server" OnClick="btn_PresidentAndCoo_Approve_Click" /> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell> 
         <asp:Label runat="server" ID="lbl_HR" Text="Human Resources :"></asp:Label> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:DropDownList ID="drpdwnlst_HR_Name" runat="server" Width="35%"></asp:DropDownList> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_HRSignature" runat="server"></asp:TextBox> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_HRDate" runat="server" ReadOnly="true" Visible="false"></asp:TextBox> 
        </asp:TableCell> 
       </asp:TableRow> 
       <asp:TableRow> 
        <asp:TableCell></asp:TableCell> 
        <asp:TableCell> 
         <asp:TextBox ID="txt_HRComment" runat="server" TextMode="MultiLine" Width="100%"></asp:TextBox> 
        </asp:TableCell> 
        <asp:TableCell> 
         <asp:Button ID="btn_HR_Approve" Text="Approve" runat="server" OnClick="btn_HR_Approve_Click" /> 
        </asp:TableCell> 
       </asp:TableRow> 
      </asp:Table> 
     </ContentTemplate> 
    </asp:UpdatePanel> 
</div> 

요구 사항은 드롭 다운 선택에 따라, 나는 테이블 tbl_Approvals의 TableRow의 위치를 ​​변경하려는 것입니다.

<div> 안에 <asp:Table>을 사용할 수 없으므로이를 수행하는 방법.

답변

0

그랬 경우 목록 아래로 드롭에 대한 색인 변경 사용하여 테이블의 클래스 속성을 변경 (또는 적 의미가있는 행)를 할 때 나는 CSS 클래스로 원하는 것이 다른 스타일을 만들 것입니다 :

[object id].Attributes.Add("style", "someCssClass;"); 
관련 문제