Handsontable readonly

Tags: #<Tag:0x00007f8b1db47738>

ReadOnly not working, How can I do so?
https://stackblitz.com/edit/handsontable-readonly

Hey @testtest

a reference like this will not work for initialization settings in Angular. You need to change line 24 to true/false. Then you can manipulate it later.

worked this way

import { Component, OnInit } from ‘@angular/core’;
import * as Handsontable from ‘handsontable’;

@Component({
selector: ‘my-app’,
templateUrl: ‘./app.component.html’,
styleUrls: [ ‘./app.component.css’ ]
})
export class AppComponent implements OnInit {

readonly: boolean; //–

ngOnInit() {

//this.readonly = true
this.settingsObj.readOnly= true;
}

settingsObj: Handsontable.GridSettings = {
data: [{id: 1}, {id: 2}, {id: 3}],
columns: [
{type: ‘numeric’, data: ‘id’}
],
rowHeaders: true,
colHeaders: true,

//readOnly: this.readonly
ReadOnly: null

};
}

Does it mean that the issue is gone now? Please confirm.

Yes, problem solved.

Thank you for confirmation @testtest

I believe that we can close the topic