AG 网格列选择禁用
AG Grid Column Selection Disable
我正在使用 AG-Grid,我想禁用或隐藏列 Header 和列工具面板中的列选择选项。
请参阅下面的图片,了解我想禁用或隐藏的内容:
在构建 AG-Grid 网格时,是否可以禁用或隐藏列选择复选框?
侧边栏:
To display just one of the provided tool panels, set either sideBar='columns' or sideBar='filters'.
参见 here。
<ag-grid-angular
#agGrid
style="width: 100%; height: 100%;"
id="myGrid"
class="ag-theme-alpine"
[columnDefs]="columnDefs"
[defaultColDef]="defaultColDef"
[sideBar]="'filters'"
[rowData]="rowData"
(gridReady)="onGridReady($event)"
></ag-grid-angular>
对于列菜单:
The menu will be displayed by default and will be made up of three panels. If you want to change the order or what panels are shown, or hide them, you can specify the property menuTabs in the colDef.
The property menuTabs is an array of strings. The valid values are:
'filterMenuTab', 'generalMenuTab' and 'columnsMenuTab'
见here
this.defaultColDef = {
filter: true,
menuTabs: ['filterMenuTab', 'generalMenuTab'],
};
Demo.
我正在使用 AG-Grid,我想禁用或隐藏列 Header 和列工具面板中的列选择选项。 请参阅下面的图片,了解我想禁用或隐藏的内容:
在构建 AG-Grid 网格时,是否可以禁用或隐藏列选择复选框?
侧边栏:
To display just one of the provided tool panels, set either sideBar='columns' or sideBar='filters'.
参见 here。
<ag-grid-angular
#agGrid
style="width: 100%; height: 100%;"
id="myGrid"
class="ag-theme-alpine"
[columnDefs]="columnDefs"
[defaultColDef]="defaultColDef"
[sideBar]="'filters'"
[rowData]="rowData"
(gridReady)="onGridReady($event)"
></ag-grid-angular>
对于列菜单:
The menu will be displayed by default and will be made up of three panels. If you want to change the order or what panels are shown, or hide them, you can specify the property menuTabs in the colDef.
The property menuTabs is an array of strings. The valid values are: 'filterMenuTab', 'generalMenuTab' and 'columnsMenuTab'
见here
this.defaultColDef = {
filter: true,
menuTabs: ['filterMenuTab', 'generalMenuTab'],
};
Demo.