我想刪除額外的圖標列以進行展開和摺疊,並將其與我的主樹形結構列合併。 Plunkr Source從Angular UI-Grid中刪除額外的圖標列TreeView
在下面的鏈接中,您可以看到在樹形視圖中它爲擴展和摺疊創建了額外的列,但我想將它與我的第一列(名稱)合併,並且我還想更改圖標。請幫助我,我該如何實現這一目標。
onRegisterApi: function(gridApi) {
$scope.gridApi = gridApi;
$scope.gridApi.treeBase.on.rowExpanded($scope, function(row) {
if(row.entity.$$hashKey === $scope.gridOptions.data[50].$$hashKey && !$scope.nodeLoaded) {
$interval(function() {
$scope.gridOptions.data.splice(51,0,
{name: 'Dynamic 1', gender: 'female', age: 53, company: 'Griddable grids', balance: 38000, $$treeLevel: 1},
{name: 'Dynamic 2', gender: 'male', age: 18, company: 'Griddable grids', balance: 29000, $$treeLevel: 1}
);
$scope.nodeLoaded = true;
}, 2000, 1);
}
});
}
你可以做一個plnkr和共享 – Kathir
沒有感謝我犯了一個錯誤,現在它完全是工作:) 讓我刪除我之前的評論太 –
作爲showTreeRowHeader:假對我的作品,但現在我有一個大的數據集,從而第一列顯示直到數據未加載請檢查以下鏈接:http://tidal41.tidalhosting.com/qc/auditor-new/index1.html –