Posted 16 April 2018, 2:31 am EST
I have multiple databound sheets in a workbook, and adding the below event handler causes the cell to be disabled on all sheets. (every sheet’s row 1 col 1 is frozen).
flexSheet.beginningEdit.addHandler(function (sender, e) {
if (e.row === 1 && e.col === 1) {
e.cancel = true;
}
});
Is there not a better way to do this than a handler on the whole grid? Can it be tied to the individual worksheet? As you can imagine, freezing every cell of the workbook is not my intention.
The below works to make a column read only (DOES NOT WORK FOR ROW) on a particular sheet (just set the active sheet before setting the read only). Can a similar attribute be added to a cell and row?
// references FlexSheet named 'ServerWorkbook' in the view
@ViewChild('ServerWorkbook') ServerWorkbook: wjcGridSheet.FlexSheet;
// stuff . . . then when applying formats on a per sheet Index:
this.ServerWorkbook.sheets.selectedIndex = sheetIndex;
this.ServerWorkbook.sheets[sheetIndex].grid.columns[8].isReadOnly = true;