2014-10-17 68 views
1

我正在使用trnggrid角度顯示我的數據網格格式。下面是我的代碼角度TrngGrid額外的列被添加

<div class="row-fluid"> 
    <table tr-ng-grid="" items="products" page-items="5" class="table table-condensed table-hover"> 
     <thead> 
      <tr> 
       <th field-name="Id" display-name="Id" enable-filtering="true" enable-sorting="true" cell-width="10em" display-align="right"> 
       </th> 
       <th field-name="Name" display-name="Name" enable-filtering="true" enable-sorting="true" cell-width="10em" display-align="right"> 
       </th> 
       <th field-name="Unit" display-name="Unit" enable-filtering="true" enable-sorting="true" cell-width="10em" display-align="right"> 
       </th> 
      </tr> 
     </thead> 
     <tbody> 
      <tr ng-repeat="product in products"> 

       <td>{{product.Id}}</td> 
       <td>{{product.Name}}</td> 
       <td>{{product.Unit}}</td> 
       <td> 
        <a ng-click="viewProduct(gridDisplayItem.Id)">View |</a>&nbsp; 
        <a ng-click="editProduct(gridDisplayItem.Id)"> Edit |</a>&nbsp; 
        <a ng-click="deleteProduct(gridDisplayItem.Id)">Delete</a> 
       </td> 

      </tr> 
     </tbody> 
    </table> 
</div> 

然而,當我運行此,三個額外的列獲取添加無效header.Have把截圖在這個環節。 http://i.imgur.com/ZHoLTwW.png

有人可以建議這是什麼解決方案。提前致謝!!

回答

1

在TBODY刪除NG重複指令,並刪除第3,他們並不需要,因爲表指示已經處理,對於你....

查看|   編輯|   刪除
+0

感謝@保羅!它真的幫助! – Philomath 2014-11-03 12:22:53