2013-12-13 49 views
0

如何爲koGrid創建頁腳模板以顯示列的總和?如何爲KoGrid創建腳模板?

gridOptions : { 
     displaySelectionCheckbox: false, 
     data: items, 
     // selectedItems: self.selectedItems, 
     multiSelect: false, 

     enableColumnResize: true, 

     columnDefs: [ 
         { field: 'fun_id', displayName: 'fun_id', visible: false }, 
         { field: 'test', displayName: 'Test' }, 
         { field: 'details', displayName: 'Details'}, 
         { field: 'qty', displayName: 'Qty' }, 
         { field: 'price', displayName: 'Price' }, 
         { field: 'discount', displayName: 'Discount' }, 
         { field: 'empno', displayName: 'EmpNo' }, 
         { field: 'promo', displayName: 'Promo' }, 
         { field: 'Delete', cellTemplate: myCellTemplate, width: 60 }, 
     ] 
    } 

enter image description here

在這裏,我想打印的「價格」字段的Footer.How總和爲總我能做到這一點?

回答