मेरे द्वारा बनाए गए ui ग्रिड कि, तीन कॉलम है डिफ़ॉल्ट रूप से से छँटाई मेनू निकालें, स्तंभ शीर्ष लेख एक 'वी' आकार का चिह्न (छवि में लाल घेरे में चिह्नित) हैui ग्रिड स्तंभ शीर्ष लेख
यहाँकोड और plunker:
var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.expandable', 'ui.grid.selection', 'ui.grid.pinning']);
app.controller('ThirdCtrl', ['$scope', '$http', '$log', function ($scope, $http, $log) {
$scope.gridOptions = {
expandableRowTemplate: 'expandableRowTemplate.html',
expandableRowHeight: 150,
onRegisterApi: function (gridApi) {
gridApi.expandable.on.rowExpandedStateChanged($scope, function (row) {
if (row.isExpanded) {
row.entity.subGridOptions = {
columnDefs: [
{ name: 'name'},
{ name: 'gender'},
{ name: 'company'}
]};
$http.get('https://cdn.rawgit.com/angular-ui/ui-grid.info/gh-pages/data/100.json')
.success(function(data) {
row.entity.subGridOptions.data = data;
});
}
});
}
}
$scope.gridOptions.columnDefs = [
{ name: 'id', pinnedLeft:true },
{ name: 'name'},
{ name: 'age'},
{ name: 'address.city'}
];
$http.get('https://cdn.rawgit.com/angular-ui/ui-grid.info/gh-pages/data/500_complex.json')
.success(function(data) {
$scope.gridOptions.data = data;
});
}]);
.grid {
width: 100%;
height: 400px;
}
<!doctype html>
<html ng-app="app">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular-touch.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular-animate.js"></script>
<script src="http://ui-grid.info/docs/grunt-scripts/csv.js"></script>
<script src="http://ui-grid.info/docs/grunt-scripts/pdfmake.js"></script>
<script src="http://ui-grid.info/docs/grunt-scripts/vfs_fonts.js"></script>
<script src="http://ui-grid.info/release/ui-grid.js"></script>
<link rel="stylesheet" href="http://ui-grid.info/release/ui-grid.css" type="text/css">
<link rel="stylesheet" href="main.css" type="text/css">
</head>
<body>
<div ng-controller="ThirdCtrl">
<div ui-grid="gridOptions" ui-grid-expandable class="grid"></div>
</div>
<script src="app.js"></script>
</body>
</html>
वें उपरोक्त छवि में ई ग्रिड मैंने अपनी परियोजना में बनाया है।
मेरा सवाल यह है कि मैं लाल सर्कल में हेडर पंक्ति में "v" चिह्न को कैसे हटा सकता हूं?
यह सही उत्तर नहीं है। Normaly आप अपने columDefs परिभाषित किया है। फिर आपको प्रत्येक columDef के अंदर enableColumsMenus को स्थानांतरित करना होगा। तो नीचे जवाब सही है! –
मुझे नहीं पता कि मैं कहूंगा कि 'यह सही जवाब नहीं है'। ओपी ने पूछा कि सभी शीर्षकों से मेनू ड्रॉप डाउन को कैसे हटाया जाए, और यह उत्तर उस प्रश्न के लिए सही है। दूसरा उत्तर ग्रैन्युलरिटी पर अतिरिक्त जानकारी प्रदान करता है, लेकिन इससे यह जवाब गलत नहीं होता है। – bradimus