簡體   English   中英

Ext JS 4.2:如何在網格中禁用折疊分組

[英]Ext JS 4.2: How to disable collapsing grouping in the grid

我有一個啟用分組的網格。 但是我想禁用折疊組項目的功能

有任何想法嗎?

謝謝塔拉汗

http://docs-origin.sencha.com/extjs/4.2.2/#!/api/Ext.grid.feature.Grouping-cfg-collapsible

可折疊:布爾

設置為false可從UI禁用折疊組。 緩沖關聯存儲時,將其設置為false。

默認為:true

在網格上使用features: [{ftype:'grouping', collapsible: false}],

 Ext.application({ name: 'Fiddle', launch: function() { var store = Ext.create('Ext.data.Store', { storeId: 'employeeStore', fields: ['name', 'seniority', 'department'], groupField: 'department', data: { 'employees': [{ "name": "Michael Scott", "seniority": 7, "department": "Management" }, { "name": "Dwight Schrute", "seniority": 2, "department": "Sales" }, { "name": "Jim Halpert", "seniority": 3, "department": "Sales" }, { "name": "Kevin Malone", "seniority": 4, "department": "Accounting" }, { "name": "Angela Martin", "seniority": 5, "department": "Accounting" }] }, proxy: { type: 'memory', reader: { type: 'json', root: 'employees' } } }); Ext.create('Ext.grid.Panel', { title: 'Employees', store: Ext.data.StoreManager.lookup('employeeStore'), columns: [{ text: 'Name', dataIndex: 'name', flex: 1 }, { text: 'Seniority', dataIndex: 'seniority', flex: 1 }], features: [{ ftype: 'grouping', collapsible: false }], width: 500, renderTo: Ext.getBody() }); } }); 
 <script src="https://extjs.cachefly.net/ext/gpl/4.2.1/ext-all-debug.js"></script> <link href="https://extjs.cachefly.net/ext/gpl/4.2.1/packages/ext-theme-classic/build/resources/ext-theme-classic-all.css" rel="stylesheet"/> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM