ASP.NET创建动态表包含rowspan属性

时间:2012-10-02 09:10:54

标签: asp.net

  

我想创建一个动态表。下面你可以看到starsign   必须是动态的。植物名称(动态)= DAP1,TUP1,GEP3,PSP2
  配置名称(动态)= KSROC,100ROC关键值名称   (动态)=最大容量,可用容量,装载水平,当然我   想要用下面提到的rowspan代码。谢谢您的帮助   我只是被困住了

<table class="table1">
         <thead>
             <tr>
                     <th>Config</th>
                     <th>Key Figure</th>
                     <th>*DAP1*</th>
                     <th>*TUP1*</th>
                     <th>*GEP3*</th>
                     <th>*PSP2*</th>
             </tr>
         </thead>        
             <tr>                     
                     <th rowspan="4">*KSROC*</th>                    
                     <tr>
                        <th>*Max Capacity*</th>
                        <td>*will be populated according to DAP1*</td>
                        <td>*will be populated according to TUP1*</td>
                        <td>*will be populated according to GEP3*</td>
                        <td>*will be populated according to PSP2*</td>                   
                     </tr>
                     <tr>
                        <th>*Free Capacity*</th>
                        <td>*will be populated according to DAP1*</td>
                        <td>*will be populated according to TUP1*</td>
                        <td>*will be populated according to GEP3*</td>
                        <td>*will be populated according to PSP2*</td>  
                     </tr>
                     <tr>
                        <th>*Loading Level*</th>
                        <td>*will be populated according to DAP1*</td>
                        <td>*will be populated according to TUP1*</td>
                        <td>*will be populated according to GEP3*</td>
                        <td>*will be populated according to PSP2*</td>  
                     </tr>
             </tr>             

                     <th rowspan="4" >*100ROC*</th>
                     <tr>
                        <th>*Max Capacity*</th>
                        <td>*will be populated according to DAP1*</td>
                        <td>*will be populated according to TUP1*</td>
                        <td>*will be populated according to GEP3*</td>
                        <td>*will be populated according to PSP2*</td>                   
                     </tr>
                     <tr>
                        <th>*Free Capacity*</th>
                        <td>*will be populated according to DAP1*</td>
                        <td>*will be populated according to TUP1*</td>
                        <td>*will be populated according to GEP3*</td>
                        <td>*will be populated according to PSP2*</td>  
                     </tr>
                     <tr>
                        <th>*Loading Level*</th>
                        <td>*will be populated according to DAP1*</td>
                        <td>*will be populated according to TUP1*</td>
                        <td>*will be populated according to GEP3*</td>
                        <td>*will be populated according to PSP2*</td>  
                     </tr>
             </tr>

     </table>

1 个答案:

答案 0 :(得分:0)

您可以使用asp.net Repeater,在此tutorial中有一个如何使用它的示例。