Property 'setRangeReadOnly' does not exist on type 'SpreadsheetComponent'

Since which version is the setRangeReadOnly function available in angular ej2 spreadsheets?, 

Currently using v 20, but also tried v21 and v22 with same results.

Kindly waiting


1 Reply 1 reply marked as answer

JS Janakiraman Sakthivel Syncfusion Team August 6, 2024 10:37 AM UTC

Hi Ernesto Mejia,

We have included our method "setRangeReadOnly" in version v26.1.35. Therefore, we suggest you upgrade your package to v26.1.35 or any later version to use the "setRangeReadOnly" method. Our latest version is v26.2.7.

Please find the packages link below.

Latest version (v26.2.7) - @syncfusion/ej2-angular-spreadsheet - npm (npmjs.com)

Version v26.1.35 - @syncfusion/ej2-angular-spreadsheet - npm (npmjs.com)

For your reference, we have created a sample in version v26.1.35. In this sample, we have set the read-only status for the range "A2:A30" using the "setRangeReadOnly" method in the created event. Please find the sample along with the code snippets below.


Sample (v26.2.7): Pgywap (forked) - StackBlitz

API Link: https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/#setrangereadonly


CODE SNIPPET:

created() {

        this.spreadsheetObj.setRangeReadOnly(true, 'A2:A30', 0);

    }


Kindly check the details shared above on your end and get back to us if you need further clarifications regarding this.


Marked as answer
Loader.
Up arrow icon