|
@@ -12,7 +12,7 @@ let ColSettingObj = {
|
|
readOnly: null,
|
|
readOnly: null,
|
|
checkBox: null
|
|
checkBox: null
|
|
},
|
|
},
|
|
- Rows: {data: 0, filedName: 0, getText: 1, wordWrap: 2, cellType: 3, width: 4, readOnly: 5, showHint: 6, visible: 7},
|
|
|
|
|
|
+ Rows: {data: 0, filedName: 0, getText: 1, wordWrap: 2, cellType: 3, width: 4, readOnly: 5, showHint: 6, visible: 7, customize: 8},
|
|
columnValueChanged: function (e, info) {
|
|
columnValueChanged: function (e, info) {
|
|
let that = ColSettingObj;
|
|
let that = ColSettingObj;
|
|
info.colList.forEach(function (iCol) {
|
|
info.colList.forEach(function (iCol) {
|
|
@@ -67,7 +67,7 @@ let ColSettingObj = {
|
|
sheet.setColumnCount(2, GC.Spread.Sheets.SheetArea.rowHeader);
|
|
sheet.setColumnCount(2, GC.Spread.Sheets.SheetArea.rowHeader);
|
|
sheet.setColumnWidth(0, 80, GC.Spread.Sheets.SheetArea.rowHeader);
|
|
sheet.setColumnWidth(0, 80, GC.Spread.Sheets.SheetArea.rowHeader);
|
|
sheet.setColumnWidth(1, 70, GC.Spread.Sheets.SheetArea.rowHeader);
|
|
sheet.setColumnWidth(1, 70, GC.Spread.Sheets.SheetArea.rowHeader);
|
|
- sheet.setRowCount(setting.headRows + this.Rows.visible + 1);
|
|
|
|
|
|
+ sheet.setRowCount(setting.headRows + this.Rows.customize + 1);
|
|
|
|
|
|
sheet.setText(setting.headRows + this.Rows.data, 0, 'Data', GC.Spread.Sheets.SheetArea.rowHeader);
|
|
sheet.setText(setting.headRows + this.Rows.data, 0, 'Data', GC.Spread.Sheets.SheetArea.rowHeader);
|
|
sheet.setStyle(setting.headRows + this.Rows.data, -1, this.DEFAULT_DATA_STYLE);
|
|
sheet.setStyle(setting.headRows + this.Rows.data, -1, this.DEFAULT_DATA_STYLE);
|
|
@@ -82,6 +82,7 @@ let ColSettingObj = {
|
|
initColProperty(this.Rows.showHint, 'ShowHint');
|
|
initColProperty(this.Rows.showHint, 'ShowHint');
|
|
initColProperty(this.Rows.visible, 'Visible');
|
|
initColProperty(this.Rows.visible, 'Visible');
|
|
initColProperty(this.Rows.cellType, 'CellType');
|
|
initColProperty(this.Rows.cellType, 'CellType');
|
|
|
|
+ initColProperty(this.Rows.customize, 'Customize');
|
|
},
|
|
},
|
|
initColSetting: function (setting) {
|
|
initColSetting: function (setting) {
|
|
this.DEFAULT_TITLE_STYLE = this.getCellStyle('Arial', GC.Spread.Sheets.HorizontalAlign.center, GC.Spread.Sheets.VerticalAlign.center);
|
|
this.DEFAULT_TITLE_STYLE = this.getCellStyle('Arial', GC.Spread.Sheets.HorizontalAlign.center, GC.Spread.Sheets.VerticalAlign.center);
|
|
@@ -159,6 +160,9 @@ let ColSettingObj = {
|
|
// visible
|
|
// visible
|
|
cell = sheet.getCell(this.colSetting.headRows + this.Rows.visible, iCol, GC.Spread.Sheets.SheetArea.viewport);
|
|
cell = sheet.getCell(this.colSetting.headRows + this.Rows.visible, iCol, GC.Spread.Sheets.SheetArea.viewport);
|
|
cell.cellType(this.cellType.checkBox).value(col.visible).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
|
|
cell.cellType(this.cellType.checkBox).value(col.visible).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
|
|
|
|
+ // customize
|
|
|
|
+ cell = sheet.getCell(this.colSetting.headRows + this.Rows.customize, iCol, GC.Spread.Sheets.SheetArea.viewport);
|
|
|
|
+ cell.cellType(this.cellType.checkBox).value(col.customize).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -185,6 +189,7 @@ let ColSettingObj = {
|
|
sheet.setValue(this.colSetting.headRows + this.Rows.readOnly, iCol, false, GC.Spread.Sheets.SheetArea.viewport);
|
|
sheet.setValue(this.colSetting.headRows + this.Rows.readOnly, iCol, false, GC.Spread.Sheets.SheetArea.viewport);
|
|
sheet.getCell(this.colSetting.headRows + this.Rows.showHint, iCol).cellType(this.cellType.checkBox).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
|
|
sheet.getCell(this.colSetting.headRows + this.Rows.showHint, iCol).cellType(this.cellType.checkBox).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
|
|
sheet.getCell(this.colSetting.headRows + this.Rows.visible, iCol).cellType(this.cellType.checkBox).hAlign(GC.Spread.Sheets.HorizontalAlign.center).value(true);
|
|
sheet.getCell(this.colSetting.headRows + this.Rows.visible, iCol).cellType(this.cellType.checkBox).hAlign(GC.Spread.Sheets.HorizontalAlign.center).value(true);
|
|
|
|
+ sheet.getCell(this.colSetting.headRows + this.Rows.customize, iCol).cellType(this.cellType.checkBox).hAlign(GC.Spread.Sheets.HorizontalAlign.center).value(false);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
setHeaderRowCount: function (count) {
|
|
setHeaderRowCount: function (count) {
|
|
@@ -244,6 +249,7 @@ let ColSettingObj = {
|
|
col.showHint = sheet.getValue(setting.headRows + this.Rows.showHint, iCol) || false;
|
|
col.showHint = sheet.getValue(setting.headRows + this.Rows.showHint, iCol) || false;
|
|
}
|
|
}
|
|
col.visible = sheet.getValue(setting.headRows + this.Rows.visible, iCol) || false;
|
|
col.visible = sheet.getValue(setting.headRows + this.Rows.visible, iCol) || false;
|
|
|
|
+ col.customize = sheet.getValue(setting.headRows + this.Rows.customize, iCol) || false;
|
|
|
|
|
|
col.head = {};
|
|
col.head = {};
|
|
col.head.titleNames = [];
|
|
col.head.titleNames = [];
|