我找到一个AutoMerge的属性,- var columns = [
- { id: 'country', caption: 'Country', dataField: 'Country', width: 180, allowCellMerging: true, allowEditing: false },
- { id: 'state', caption: 'State', dataField: 'State', width: 120, allowCellMerging: true, allowEditing: false },
- { id: 'city', caption: 'City', dataField: 'City', width: 120, allowCellMerging: true },
- { id: 'product', caption: 'Product', dataField: 'Product', width: 280, allowCellMerging: true },
- { id: 'detail', caption: 'Detail', dataField: 'Product_Detail', width: '*' },
- ];
- var grouping = [{
- field: 'country',
- header: {
- visible: false
- },
- footer: {
- visible: false
- }
- }, {
- field: 'state',
- header: {
- visible: false
- },
- footer: {
- visible: false
- }
- }];
- var dataView = new GC.Spread.Views.DataView(document.getElementById('grid1'), data, columns, new GC.Spread.Views.Plugins.GridLayout({
- allowColumnReorder: false,
- allowCellMerging: true,
- selectionUnit: 'cell',
- grouping: grouping
- }));
复制代码 这个是spreadjs自身的功能嘛? |