diff --git a/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md b/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
new file mode 100644
index 0000000000..f652653737
--- /dev/null
+++ b/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
@@ -0,0 +1,54 @@
+---
+layout: post
+title: Prevent actions without read-only and sheet protection in React Spreadsheet | Syncfusion
+description: Learn here all about to prevent actions without read-only and sheet protection in React Spreadsheet component of Syncfusion Essential JS 2 and more.
+control: Spreadsheet
+platform: document-processing
+documentation: ug
+---
+
+# How to prevent actions for specific cells without protecting the sheet or making it read-only in React Spreadsheet ?
+
+In Syncfusion React Spreadsheet, the [**read-only**](https://help.syncfusion.com/document-processing/excel/spreadsheet/react/protect-sheet#make-cells-read-only-without-protecting-worksheet) feature makes a range of cells, rows, or columns completely non-editable and restricts all spreadsheet actions on those cells. Similarly, the [**sheet protection**](https://help.syncfusion.com/document-processing/excel/spreadsheet/react/protect-sheet#protect-sheet) feature locks the entire sheet and restricts all spreadsheet actions on the sheet. It does not allow actions such as formatting cells, rows, or columns, selecting cells, or inserting hyperlinks—unless these options are explicitly enabled in the [`protectSettings`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/protectsettingsmodel).
+
+If your requirement is to prevent actions (such as cut, paste, autofill, formatting, and validation) without locking the entire sheet using the [`protectSheet`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#protectsheet) method or making the cells read-only via the [`setRangeReadOnly`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#setrangereadonly) method, you can achieve this through event-based customization. This approach allows you to restrict specific actions on selected cells while keeping the rest of the sheet fully interactive.
+
+**Events to Use**
+To achieve this requirement, the following events can be used:
+
+* [`cellEdit`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#celledit) → To prevent editing for specific cells.
+* [`actionBegin`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#actionbegin)→ To prevent spreadsheet actions such as cut, paste, autofill, formatting, etc.
+
+**Step 1: Prevent editing for specific cells**
+
+To prevent editing for specific cells, use the [`cellEdit`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#celledit) event, which triggers whenever a cell enters edit mode. By checking the column index and setting `args.cancel = true`, you can prevent editing for those columns. This ensures that users cannot modify the cell content in those columns.
+
+**Step 2: Prevent specfic spreadsheet actions**
+
+To prevent specfic action after preventing the cell edting, you need to use the [`actionBegin`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#actionbegin) event. This event triggers before any action starts (such as cut, paste, autofill, formatting, etc.). In this event:
+
+* Fetch the target address based on the type of action being performed using `args.action` property.
+* Verify if the target range includes the restricted columns.
+* If the column is in the restricted list, cancel the action by setting `args.cancel = true`.
+
+This approach ensures that spreadsheet actions such as cut, paste, autofill, formatting, validation, and conditional formatting are prevented for specific cells without protecting the sheet or making the cells read-only.
+
+ > **Note:** In this example, we use column indexes to restrict actions. You can also use row indexes or cell addresses for the same purpose.
+
+The following example demonstrates how to prevent actions such as cut, paste, autofill, formatting, validation, and conditional formatting for specific cells in the spreadsheet without protecting the sheet or making the cells read-only. You can also restrict additional actions by following the same approach.
+
+{% tabs %}
+{% highlight js tabtitle="app.jsx" %}
+{% include code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.jsx %}
+{% endhighlight %}
+{% highlight ts tabtitle="app.tsx" %}
+{% include code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.tsx %}
+{% endhighlight %}
+{% endtabs %}
+
+
+{% previewsample "/document-processing/code-snippet/spreadsheet/react/prevent-actions-cs1" %}
+
+## See Also
+
+* [Protection](https://help.syncfusion.com/document-processing/excel/spreadsheet/react/protect-sheet)
\ No newline at end of file
diff --git a/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.jsx b/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.jsx
new file mode 100644
index 0000000000..4ef29bfd7c
--- /dev/null
+++ b/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.jsx
@@ -0,0 +1,75 @@
+import * as React from 'react';
+import { createRoot } from 'react-dom/client';
+import { SpreadsheetComponent, SheetsDirective, SheetDirective, RangesDirective } from '@syncfusion/ej2-react-spreadsheet';
+import { RangeDirective, ColumnsDirective, ColumnDirective, getRangeIndexes } from '@syncfusion/ej2-react-spreadsheet';
+import { data } from './datasource';
+
+function App() {
+ const spreadsheetRef = React.useRef(null);
+ // Columns to be prevented editing.
+ const readOnlyColumns = [0,2];
+
+ const cellEdit = (args) =>{
+ var addressRange = getRangeIndexes(args.address);
+ // preventing cellEditing from the readOnly columns
+ if (readOnlyColumns.includes(addressRange[1]) || readOnlyColumns.includes(addressRange[3])) {
+ args.cancel = true;
+ }
+ }
+
+ // Triggers whenever any action begins in spreadsheet.
+ const actionBegin = (args) =>{
+ var address;
+ if (args.action == "clipboard") {
+ address = args.args.eventArgs.pastedRange;
+ }
+ else if (args.action == "autofill") {
+ address = args.args.eventArgs.fillRange;
+ }
+ else if (args.action == "format" || args.action == "validation" || args.action == "conditionalFormat") {
+ address = args.args.eventArgs.range;
+ }
+ else if (args.action == "cut") {
+ address = args.args.copiedRange
+ }
+ if (address) {
+ var addressRange = getRangeIndexes(address);
+ var colStart = addressRange[1];
+ var colEnd = addressRange[3];
+ // preventing other actions from the readOnly columns
+ for (var col = colStart; col <= colEnd; col++) {
+ if (readOnlyColumns.includes(col)) {
+ if (args.args.action == "cut") {
+ args.args.cancel = true;
+ } else {
+ args.args.eventArgs.cancel = true;
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+export default App;
+
+const root = createRoot(document.getElementById('root'));
+root.render();
\ No newline at end of file
diff --git a/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.tsx b/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.tsx
new file mode 100644
index 0000000000..0cad9cd86e
--- /dev/null
+++ b/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.tsx
@@ -0,0 +1,75 @@
+import * as React from 'react';
+import { createRoot } from 'react-dom/client';
+import { SpreadsheetComponent, SheetsDirective, SheetDirective, RangesDirective } from '@syncfusion/ej2-react-spreadsheet';
+import { RangeDirective, ColumnsDirective, ColumnDirective, getRangeIndexes } from '@syncfusion/ej2-react-spreadsheet';
+import { data } from './datasource';
+
+function App() {
+ const spreadsheetRef = React.useRef(null);
+ // Columns to be prevented editing.
+ const readOnlyColumns = [0,2];
+
+ const cellEdit = (args: any) =>{
+ var addressRange = getRangeIndexes(args.address);
+ // preventing cellEditing from the readOnly columns
+ if (readOnlyColumns.includes(addressRange[1]) || readOnlyColumns.includes(addressRange[3])) {
+ args.cancel = true;
+ }
+ }
+
+ // Triggers whenever any action begins in spreadsheet.
+ const actionBegin = (args: any) =>{
+ var address: any;
+ if (args.action == "clipboard") {
+ address = args.args.eventArgs.pastedRange;
+ }
+ else if (args.action == "autofill") {
+ address = args.args.eventArgs.fillRange;
+ }
+ else if (args.action == "format" || args.action == "validation" || args.action == "conditionalFormat") {
+ address = args.args.eventArgs.range;
+ }
+ else if (args.action == "cut") {
+ address = args.args.copiedRange
+ }
+ if (address) {
+ var addressRange = getRangeIndexes(address);
+ var colStart = addressRange[1];
+ var colEnd = addressRange[3];
+ // preventing other actions from the readOnly columns
+ for (var col = colStart; col <= colEnd; col++) {
+ if (readOnlyColumns.includes(col)) {
+ if (args.args.action == "cut") {
+ args.args.cancel = true;
+ } else {
+ args.args.eventArgs.cancel = true;
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ return (
+
+
+
+
\ No newline at end of file
diff --git a/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/systemjs.config.js b/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/systemjs.config.js
new file mode 100644
index 0000000000..d93d37d6fc
--- /dev/null
+++ b/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/systemjs.config.js
@@ -0,0 +1,58 @@
+System.config({
+ transpiler: "ts",
+ typescriptOptions: {
+ target: "es5",
+ module: "commonjs",
+ moduleResolution: "node",
+ emitDecoratorMetadata: true,
+ experimentalDecorators: true,
+ "jsx": "react"
+ },
+ meta: {
+ 'typescript': {
+ "exports": "ts"
+ }
+ },
+ paths: {
+ "syncfusion:": "https://cdn.syncfusion.com/ej2/31.2.12/"
+ },
+ map: {
+ app: 'app',
+ ts: "https://unpkg.com/plugin-typescript@4.0.10/lib/plugin.js",
+ typescript: "https://unpkg.com/typescript@2.2.2/lib/typescript.js",
+ "@syncfusion/ej2-base": "syncfusion:ej2-base/dist/ej2-base.umd.min.js",
+ "@syncfusion/ej2-data": "syncfusion:ej2-data/dist/ej2-data.umd.min.js",
+ "@syncfusion/ej2-lists": "syncfusion:ej2-lists/dist/ej2-lists.umd.min.js",
+ "@syncfusion/ej2-navigations": "syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js",
+ "@syncfusion/ej2-notifications": "syncfusion:ej2-notifications/dist/ej2-notifications.umd.min.js",
+ "@syncfusion/ej2-popups": "syncfusion:ej2-popups/dist/ej2-popups.umd.min.js",
+ "@syncfusion/ej2-dropdowns": "syncfusion:ej2-dropdowns/dist/ej2-dropdowns.umd.min.js",
+ "@syncfusion/ej2-inputs": "syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js",
+ "@syncfusion/ej2-splitbuttons": "syncfusion:ej2-splitbuttons/dist/ej2-splitbuttons.umd.min.js",
+ "@syncfusion/ej2-buttons": "syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js",
+ "@syncfusion/ej2-calendars": "syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js",
+ "@syncfusion/ej2-excel-export": "syncfusion:ej2-excel-export/dist/ej2-excel-export.umd.min.js",
+ "@syncfusion/ej2-pdf-export": "syncfusion:ej2-pdf-export/dist/ej2-pdf-export.umd.min.js",
+ "@syncfusion/ej2-file-utils": "syncfusion:ej2-file-utils/dist/ej2-file-utils.umd.min.js",
+ "@syncfusion/ej2-compression": "syncfusion:ej2-compression/dist/ej2-compression.umd.min.js",
+ "@syncfusion/ej2-grids": "syncfusion:ej2-grids/dist/ej2-grids.umd.min.js",
+ "@syncfusion/ej2-charts": "syncfusion:ej2-charts/dist/ej2-charts.umd.min.js",
+ "@syncfusion/ej2-svg-base": "syncfusion:ej2-svg-base/dist/ej2-svg-base.umd.min.js",
+ "@syncfusion/ej2-spreadsheet": "syncfusion:ej2-spreadsheet/dist/ej2-spreadsheet.umd.min.js",
+ "@syncfusion/ej2-react-base": "syncfusion:ej2-react-base/dist/ej2-react-base.umd.min.js",
+ "@syncfusion/ej2-react-spreadsheet": "syncfusion:ej2-react-spreadsheet/dist/ej2-react-spreadsheet.umd.min.js",
+ "react-dom/client": "https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js",
+ "react-dom": "https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js",
+ "react": "https://unpkg.com/react@18.2.0/umd/react.production.min.js",
+
+ },
+ packages: {
+ 'app': { main: 'app', defaultExtension: 'tsx' },
+ }
+
+});
+
+System.import('app');
+
+
+
From 174af871495cb8ad07c9a5975b783de5e4262a46 Mon Sep 17 00:00:00 2001
From: DinakarSF4212 <147583019+DinakarSF4212@users.noreply.github.com>
Date: Mon, 1 Dec 2025 18:59:38 +0530
Subject: [PATCH 2/7] 991939: How to prevent Spreadsheet actions for the
specific cells without protecting the sheet or making cells read-only
---
.../Excel/Spreadsheet/React/how-to/prevent-actions.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md b/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
index f652653737..a0452fbb89 100644
--- a/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
+++ b/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
@@ -1,13 +1,13 @@
---
layout: post
-title: Prevent actions without read-only and sheet protection in React Spreadsheet | Syncfusion
+title: Prevent actions without read-only and sheet protection in Spreadsheet | Syncfusion
description: Learn here all about to prevent actions without read-only and sheet protection in React Spreadsheet component of Syncfusion Essential JS 2 and more.
control: Spreadsheet
platform: document-processing
documentation: ug
---
-# How to prevent actions for specific cells without protecting the sheet or making it read-only in React Spreadsheet ?
+# Prevent actions without read-Only and sheet protection in React Spreadsheet
In Syncfusion React Spreadsheet, the [**read-only**](https://help.syncfusion.com/document-processing/excel/spreadsheet/react/protect-sheet#make-cells-read-only-without-protecting-worksheet) feature makes a range of cells, rows, or columns completely non-editable and restricts all spreadsheet actions on those cells. Similarly, the [**sheet protection**](https://help.syncfusion.com/document-processing/excel/spreadsheet/react/protect-sheet#protect-sheet) feature locks the entire sheet and restricts all spreadsheet actions on the sheet. It does not allow actions such as formatting cells, rows, or columns, selecting cells, or inserting hyperlinks—unless these options are explicitly enabled in the [`protectSettings`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/protectsettingsmodel).
@@ -23,9 +23,9 @@ To achieve this requirement, the following events can be used:
To prevent editing for specific cells, use the [`cellEdit`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#celledit) event, which triggers whenever a cell enters edit mode. By checking the column index and setting `args.cancel = true`, you can prevent editing for those columns. This ensures that users cannot modify the cell content in those columns.
-**Step 2: Prevent specfic spreadsheet actions**
+**Step 2: Prevent specific spreadsheet actions**
-To prevent specfic action after preventing the cell edting, you need to use the [`actionBegin`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#actionbegin) event. This event triggers before any action starts (such as cut, paste, autofill, formatting, etc.). In this event:
+To prevent specific action after preventing the cell editing, you need to use the [`actionBegin`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#actionbegin) event. This event triggers before any action starts (such as cut, paste, autofill, formatting, etc.). In this event:
* Fetch the target address based on the type of action being performed using `args.action` property.
* Verify if the target range includes the restricted columns.
From d6a56aa5ccb040ce1e4a3e1c34f43cdc49995ed2 Mon Sep 17 00:00:00 2001
From: DinakarSF4212 <147583019+DinakarSF4212@users.noreply.github.com>
Date: Mon, 1 Dec 2025 19:17:12 +0530
Subject: [PATCH 3/7] 991939: How to prevent Spreadsheet actions for the
specific cells without protecting the sheet or making cells read-only
---
.../Excel/Spreadsheet/React/how-to/prevent-actions.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md b/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
index a0452fbb89..e7be7ca9be 100644
--- a/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
+++ b/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
@@ -7,7 +7,7 @@ platform: document-processing
documentation: ug
---
-# Prevent actions without read-Only and sheet protection in React Spreadsheet
+# Prevent actions without read-only and protection in React Spreadsheet
In Syncfusion React Spreadsheet, the [**read-only**](https://help.syncfusion.com/document-processing/excel/spreadsheet/react/protect-sheet#make-cells-read-only-without-protecting-worksheet) feature makes a range of cells, rows, or columns completely non-editable and restricts all spreadsheet actions on those cells. Similarly, the [**sheet protection**](https://help.syncfusion.com/document-processing/excel/spreadsheet/react/protect-sheet#protect-sheet) feature locks the entire sheet and restricts all spreadsheet actions on the sheet. It does not allow actions such as formatting cells, rows, or columns, selecting cells, or inserting hyperlinks—unless these options are explicitly enabled in the [`protectSettings`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/protectsettingsmodel).
From 91922b501dae955f51d6988f0c9239ba6f7066c9 Mon Sep 17 00:00:00 2001
From: DinakarSF4212 <147583019+DinakarSF4212@users.noreply.github.com>
Date: Mon, 1 Dec 2025 19:27:36 +0530
Subject: [PATCH 4/7] 991939: How to prevent Spreadsheet actions for the
specific cells without protecting the sheet or making cells read-only
---
.../Excel/Spreadsheet/React/how-to/prevent-actions.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md b/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
index e7be7ca9be..58055650da 100644
--- a/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
+++ b/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
@@ -1,6 +1,6 @@
---
layout: post
-title: Prevent actions without read-only and sheet protection in Spreadsheet | Syncfusion
+title: Prevent actions without read-only and sheet protection | Syncfusion
description: Learn here all about to prevent actions without read-only and sheet protection in React Spreadsheet component of Syncfusion Essential JS 2 and more.
control: Spreadsheet
platform: document-processing
From 56c2d45c2304bdf4b0fa5fe3b386776a75f9d917 Mon Sep 17 00:00:00 2001
From: DinakarSF4212 <147583019+DinakarSF4212@users.noreply.github.com>
Date: Fri, 30 Jan 2026 13:40:32 +0530
Subject: [PATCH 5/7] 991939: Review corrections addressed.
---
.../Excel/Spreadsheet/React/how-to/prevent-actions.md | 2 +-
.../spreadsheet/react/prevent-actions-cs1/app/app.jsx | 7 ++++---
.../spreadsheet/react/prevent-actions-cs1/app/app.tsx | 7 ++++---
.../react/prevent-actions-cs1/systemjs.config.js | 2 +-
4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md b/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
index 58055650da..8e454f27f4 100644
--- a/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
+++ b/Document-Processing/Excel/Spreadsheet/React/how-to/prevent-actions.md
@@ -35,7 +35,7 @@ This approach ensures that spreadsheet actions such as cut, paste, autofill, for
> **Note:** In this example, we use column indexes to restrict actions. You can also use row indexes or cell addresses for the same purpose.
-The following example demonstrates how to prevent actions such as cut, paste, autofill, formatting, validation, and conditional formatting for specific cells in the spreadsheet without protecting the sheet or making the cells read-only. You can also restrict additional actions by following the same approach.
+The following example demonstrates how to prevent actions such as cut, paste, autofill, formatting, validation, and conditional formatting for specific cells(in the first and third columns) in the spreadsheet without protecting the sheet or making the cells read-only. You can also restrict additional actions by following the same approach.
{% tabs %}
{% highlight js tabtitle="app.jsx" %}
diff --git a/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.jsx b/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.jsx
index 4ef29bfd7c..4e7630f1b2 100644
--- a/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.jsx
+++ b/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.jsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { createRoot } from 'react-dom/client';
import { SpreadsheetComponent, SheetsDirective, SheetDirective, RangesDirective } from '@syncfusion/ej2-react-spreadsheet';
-import { RangeDirective, ColumnsDirective, ColumnDirective, getRangeIndexes } from '@syncfusion/ej2-react-spreadsheet';
+import { RangeDirective, ColumnsDirective, ColumnDirective, getCellIndexes, getRangeIndexes } from '@syncfusion/ej2-react-spreadsheet';
import { data } from './datasource';
function App() {
@@ -9,10 +9,11 @@ function App() {
// Columns to be prevented editing.
const readOnlyColumns = [0,2];
+ // Triggers when cell editing starts in the spreadsheet.
const cellEdit = (args) =>{
- var addressRange = getRangeIndexes(args.address);
+ var addressRange = getCellIndexes(args.address.split('!')[1]);
// preventing cellEditing from the readOnly columns
- if (readOnlyColumns.includes(addressRange[1]) || readOnlyColumns.includes(addressRange[3])) {
+ if (readOnlyColumns.includes(addressRange[1])) {
args.cancel = true;
}
}
diff --git a/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.tsx b/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.tsx
index 0cad9cd86e..15fbbec743 100644
--- a/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.tsx
+++ b/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/app/app.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { createRoot } from 'react-dom/client';
import { SpreadsheetComponent, SheetsDirective, SheetDirective, RangesDirective } from '@syncfusion/ej2-react-spreadsheet';
-import { RangeDirective, ColumnsDirective, ColumnDirective, getRangeIndexes } from '@syncfusion/ej2-react-spreadsheet';
+import { RangeDirective, ColumnsDirective, ColumnDirective, getCellIndexes, getRangeIndexes } from '@syncfusion/ej2-react-spreadsheet';
import { data } from './datasource';
function App() {
@@ -9,10 +9,11 @@ function App() {
// Columns to be prevented editing.
const readOnlyColumns = [0,2];
+ // Triggers when cell editing starts in the spreadsheet.
const cellEdit = (args: any) =>{
- var addressRange = getRangeIndexes(args.address);
+ var addressRange = getCellIndexes(args.address.split('!')[1]);
// preventing cellEditing from the readOnly columns
- if (readOnlyColumns.includes(addressRange[1]) || readOnlyColumns.includes(addressRange[3])) {
+ if (readOnlyColumns.includes(addressRange[1])) {
args.cancel = true;
}
}
diff --git a/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/systemjs.config.js b/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/systemjs.config.js
index d93d37d6fc..9290509c4a 100644
--- a/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/systemjs.config.js
+++ b/Document-Processing/code-snippet/spreadsheet/react/prevent-actions-cs1/systemjs.config.js
@@ -14,7 +14,7 @@ System.config({
}
},
paths: {
- "syncfusion:": "https://cdn.syncfusion.com/ej2/31.2.12/"
+ "syncfusion:": "https://cdn.syncfusion.com/ej2/32.1.19/"
},
map: {
app: 'app',
From d427df5743bf154780867b0d62e87a3b154bc7d2 Mon Sep 17 00:00:00 2001
From: DinakarSF4212 <147583019+DinakarSF4212@users.noreply.github.com>
Date: Fri, 13 Feb 2026 18:56:36 +0530
Subject: [PATCH 6/7] 1006972: Port the How to prevent Spreadsheet actions for
the specific cells without protecting the sheet or making cells read-only
section across all the EJ2 platforms.
---
Document-Processing-toc.html | 6 +
.../ASP-NET-CORE/how-to/prevent-actions.md | 51 ++
.../ASP-NET-MVC/how-to/prevent-actions.md | 51 ++
.../Angular/how-to/prevent-actions.md | 54 ++
.../Javascript-ES5/how-to/prevent-actions.md | 54 ++
.../Javascript-ES6/how-to/prevent-actions.md | 54 ++
.../Spreadsheet/Vue/how-to/prevent-actions.md | 53 ++
.../angular/prevent-actions-cs1/angular.json | 74 +++
.../angular/prevent-actions-cs1/index.html | 13 +
.../prevent-actions-cs1/src/app.component.ts | 93 +++
.../prevent-actions-cs1/src/datasource.ts | 12 +
.../angular/prevent-actions-cs1/src/main.ts | 6 +
.../prevent-actions-cs1/src/styles.css | 10 +
.../angular/prevent-actions-cs1/tsconfig.json | 32 ++
.../PreventActionController.cs | 22 +
.../asp-net-core/prevent-actions-cs1/razor | 69 +++
.../prevent-actions-cs1/tagHelper | 66 +++
.../PreventActionController.cs | 22 +
.../asp-net-mvc/prevent-actions-cs1/razor | 69 +++
.../asp-net-mvc/prevent-actions-cs1/tagHelper | 66 +++
.../prevent-actions-cs1/datasource.ts | 12 +
.../prevent-actions-cs1/es5-datasource.js | 12 +
.../prevent-actions-cs1/index.html | 43 ++
.../prevent-actions-cs1/index.js | 62 ++
.../prevent-actions-cs1/index.ts | 67 +++
.../prevent-actions-cs1/styles.css | 19 +
.../prevent-actions-cs1/system.config.js | 44 ++
.../prevent-actions-cs1/datasource.ts | 12 +
.../prevent-actions-cs1/es5-datasource.js | 12 +
.../prevent-actions-cs1/index.html | 43 ++
.../prevent-actions-cs1/index.js | 62 ++
.../prevent-actions-cs1/index.ts | 67 +++
.../prevent-actions-cs1/styles.css | 19 +
.../prevent-actions-cs1/system.config.js | 44 ++
.../prevent-actions-cs1/app-composition.vue | 89 +++
.../vue/prevent-actions-cs1/app.vue | 96 ++++
.../vue/prevent-actions-cs1/data.js | 238 ++++++++
.../vue/prevent-actions-cs1/index.css | 3 +
.../vue/prevent-actions-cs1/index.html | 21 +
.../vue/prevent-actions-cs1/index.js | 82 +++
.../prevent-actions-cs1/systemjs.config.js | 43 ++
.../prevent-actions-cs1/3rdpartylicenses.txt | 544 ++++++++++++++++++
.../angular/prevent-actions-cs1/index.html | 13 +
.../prevent-actions-cs1/main-TLHKQK36.js | 260 +++++++++
.../prerendered-routes.json | 3 +
.../prevent-actions-cs1/styles-IMZOPFQI.css | 1 +
46 files changed, 2788 insertions(+)
create mode 100644 Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/how-to/prevent-actions.md
create mode 100644 Document-Processing/Excel/Spreadsheet/ASP-NET-MVC/how-to/prevent-actions.md
create mode 100644 Document-Processing/Excel/Spreadsheet/Angular/how-to/prevent-actions.md
create mode 100644 Document-Processing/Excel/Spreadsheet/Javascript-ES5/how-to/prevent-actions.md
create mode 100644 Document-Processing/Excel/Spreadsheet/Javascript-ES6/how-to/prevent-actions.md
create mode 100644 Document-Processing/Excel/Spreadsheet/Vue/how-to/prevent-actions.md
create mode 100644 Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/angular.json
create mode 100644 Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/index.html
create mode 100644 Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/src/app.component.ts
create mode 100644 Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/src/datasource.ts
create mode 100644 Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/src/main.ts
create mode 100644 Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/src/styles.css
create mode 100644 Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/tsconfig.json
create mode 100644 Document-Processing/code-snippet/spreadsheet/asp-net-core/prevent-actions-cs1/PreventActionController.cs
create mode 100644 Document-Processing/code-snippet/spreadsheet/asp-net-core/prevent-actions-cs1/razor
create mode 100644 Document-Processing/code-snippet/spreadsheet/asp-net-core/prevent-actions-cs1/tagHelper
create mode 100644 Document-Processing/code-snippet/spreadsheet/asp-net-mvc/prevent-actions-cs1/PreventActionController.cs
create mode 100644 Document-Processing/code-snippet/spreadsheet/asp-net-mvc/prevent-actions-cs1/razor
create mode 100644 Document-Processing/code-snippet/spreadsheet/asp-net-mvc/prevent-actions-cs1/tagHelper
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es5/prevent-actions-cs1/datasource.ts
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es5/prevent-actions-cs1/es5-datasource.js
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es5/prevent-actions-cs1/index.html
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es5/prevent-actions-cs1/index.js
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es5/prevent-actions-cs1/index.ts
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es5/prevent-actions-cs1/styles.css
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es5/prevent-actions-cs1/system.config.js
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es6/prevent-actions-cs1/datasource.ts
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es6/prevent-actions-cs1/es5-datasource.js
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es6/prevent-actions-cs1/index.html
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es6/prevent-actions-cs1/index.js
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es6/prevent-actions-cs1/index.ts
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es6/prevent-actions-cs1/styles.css
create mode 100644 Document-Processing/code-snippet/spreadsheet/javascript-es6/prevent-actions-cs1/system.config.js
create mode 100644 Document-Processing/code-snippet/spreadsheet/vue/prevent-actions-cs1/app-composition.vue
create mode 100644 Document-Processing/code-snippet/spreadsheet/vue/prevent-actions-cs1/app.vue
create mode 100644 Document-Processing/code-snippet/spreadsheet/vue/prevent-actions-cs1/data.js
create mode 100644 Document-Processing/code-snippet/spreadsheet/vue/prevent-actions-cs1/index.css
create mode 100644 Document-Processing/code-snippet/spreadsheet/vue/prevent-actions-cs1/index.html
create mode 100644 Document-Processing/code-snippet/spreadsheet/vue/prevent-actions-cs1/index.js
create mode 100644 Document-Processing/code-snippet/spreadsheet/vue/prevent-actions-cs1/systemjs.config.js
create mode 100644 Document-Processing/samples/spreadsheet/angular/prevent-actions-cs1/3rdpartylicenses.txt
create mode 100644 Document-Processing/samples/spreadsheet/angular/prevent-actions-cs1/index.html
create mode 100644 Document-Processing/samples/spreadsheet/angular/prevent-actions-cs1/main-TLHKQK36.js
create mode 100644 Document-Processing/samples/spreadsheet/angular/prevent-actions-cs1/prerendered-routes.json
create mode 100644 Document-Processing/samples/spreadsheet/angular/prevent-actions-cs1/styles-IMZOPFQI.css
diff --git a/Document-Processing-toc.html b/Document-Processing-toc.html
index 3b0ca654dc..a57c6e8739 100644
--- a/Document-Processing-toc.html
+++ b/Document-Processing-toc.html
@@ -5080,6 +5080,7 @@
diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/how-to/prevent-actions.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/how-to/prevent-actions.md
new file mode 100644
index 0000000000..ef3a96ea00
--- /dev/null
+++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/how-to/prevent-actions.md
@@ -0,0 +1,51 @@
+---
+layout: post
+title: Prevent actions without read-only and sheet protection | Syncfusion
+description: Learn here all about to prevent actions without read-only and sheet protection in ASP.NET Core Spreadsheet of Syncfusion Essential JS 2 and more.
+control: Spreadsheet
+platform: document-processing
+documentation: ug
+---
+
+# Prevent actions without read-only and protection in ASP.NET Core Spreadsheet
+
+In Syncfusion ASP.NET Core Spreadsheet, the [**read-only**](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/protect-sheet#make-cells-read-only-without-protecting-worksheet) feature makes a range of cells, rows, or columns completely non-editable and restricts all spreadsheet actions on those cells. Similarly, the [**sheet protection**](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/protect-sheet#protect-sheet) feature locks the entire sheet and restricts all spreadsheet actions on the sheet. It does not allow actions such as formatting cells, rows, or columns, selecting cells, or inserting hyperlinks—unless these options are explicitly enabled in the [`protectSettings`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/protectsettingsmodel).
+
+If your requirement is to prevent actions (such as cut, paste, autofill, formatting, and validation) without locking the entire sheet using the [`protectSheet`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#protectsheet) method or making the cells read-only via the [`setRangeReadOnly`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#setrangereadonly) method, you can achieve this through event-based customization. This approach allows you to restrict specific actions on selected cells while keeping the rest of the sheet fully interactive.
+
+**Events to Use**
+To achieve this requirement, the following events can be used:
+
+* [`cellEdit`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_CellEdit) → To prevent editing for specific cells.
+* [`actionBegin`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ActionBegin)→ To prevent spreadsheet actions such as cut, paste, autofill, formatting, etc.
+
+**Step 1: Prevent editing for specific cells**
+
+To prevent editing for specific cells, use the [`cellEdit`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_CellEdit) event, which triggers whenever a cell enters edit mode. By checking the column index and setting `args.cancel = true`, you can prevent editing for those columns. This ensures that users cannot modify the cell content in those columns.
+
+**Step 2: Prevent specific spreadsheet actions**
+
+To prevent specific action after preventing the cell editing, you need to use the [`actionBegin`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ActionBegin) event. This event triggers before any action starts (such as cut, paste, autofill, formatting, etc.). In this event:
+
+* Fetch the target address based on the type of action being performed using `args.action` property.
+* Verify if the target range includes the restricted columns.
+* If the column is in the restricted list, cancel the action by setting `args.cancel = true`.
+
+This approach ensures that spreadsheet actions such as cut, paste, autofill, formatting, validation, and conditional formatting are prevented for specific cells without protecting the sheet or making the cells read-only.
+
+ > **Note:** In this example, we use column indexes to restrict actions. You can also use row indexes or cell addresses for the same purpose.
+
+The following example demonstrates how to prevent actions such as cut, paste, autofill, formatting, validation, and conditional formatting for specific cells(in the first and third columns) in the spreadsheet without protecting the sheet or making the cells read-only. You can also restrict additional actions by following the same approach.
+
+{% tabs %}
+{% highlight cshtml tabtitle="CSHTML" %}
+{% include code-snippet/spreadsheet/asp-net-core/prevent-actions-cs1/tagHelper %}
+{% endhighlight %}
+{% highlight c# tabtitle="PreventActionController.cs" %}
+{% include code-snippet/spreadsheet/asp-net-mvc/change-active-sheet/PreventActionController.cs %}
+{% endhighlight %}
+{% endtabs %}
+
+## See Also
+
+* [Protection](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/protect-sheet)
\ No newline at end of file
diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-MVC/how-to/prevent-actions.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-MVC/how-to/prevent-actions.md
new file mode 100644
index 0000000000..369e304b49
--- /dev/null
+++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-MVC/how-to/prevent-actions.md
@@ -0,0 +1,51 @@
+---
+layout: post
+title: Prevent actions without read-only and sheet protection | Syncfusion
+description: Learn here all about to prevent actions without read-only and sheet protection in ASP.NET MVC Spreadsheet of Syncfusion Essential JS 2 and more.
+control: Spreadsheet
+platform: document-processing
+documentation: ug
+---
+
+# Prevent actions without read-only and protection in ASP.NET MVC Spreadsheet
+
+In Syncfusion ASP.NET MVC Spreadsheet, the [**read-only**](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-mvc/protect-sheet#make-cells-read-only-without-protecting-worksheet) feature makes a range of cells, rows, or columns completely non-editable and restricts all spreadsheet actions on those cells. Similarly, the [**sheet protection**](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-mvc/protect-sheet#protect-sheet) feature locks the entire sheet and restricts all spreadsheet actions on the sheet. It does not allow actions such as formatting cells, rows, or columns, selecting cells, or inserting hyperlinks—unless these options are explicitly enabled in the [`protectSettings`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/protectsettingsmodel).
+
+If your requirement is to prevent actions (such as cut, paste, autofill, formatting, and validation) without locking the entire sheet using the [`protectSheet`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#protectsheet) method or making the cells read-only via the [`setRangeReadOnly`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#setrangereadonly) method, you can achieve this through event-based customization. This approach allows you to restrict specific actions on selected cells while keeping the rest of the sheet fully interactive.
+
+**Events to Use**
+To achieve this requirement, the following events can be used:
+
+* [`cellEdit`](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_CellEdit) → To prevent editing for specific cells.
+* [`actionBegin`](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ActionBegin)→ To prevent spreadsheet actions such as cut, paste, autofill, formatting, etc.
+
+**Step 1: Prevent editing for specific cells**
+
+To prevent editing for specific cells, use the [`cellEdit`](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_CellEdit) event, which triggers whenever a cell enters edit mode. By checking the column index and setting `args.cancel = true`, you can prevent editing for those columns. This ensures that users cannot modify the cell content in those columns.
+
+**Step 2: Prevent specific spreadsheet actions**
+
+To prevent specific action after preventing the cell editing, you need to use the [`actionBegin`](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ActionBegin) event. This event triggers before any action starts (such as cut, paste, autofill, formatting, etc.). In this event:
+
+* Fetch the target address based on the type of action being performed using `args.action` property.
+* Verify if the target range includes the restricted columns.
+* If the column is in the restricted list, cancel the action by setting `args.cancel = true`.
+
+This approach ensures that spreadsheet actions such as cut, paste, autofill, formatting, validation, and conditional formatting are prevented for specific cells without protecting the sheet or making the cells read-only.
+
+ > **Note:** In this example, we use column indexes to restrict actions. You can also use row indexes or cell addresses for the same purpose.
+
+The following example demonstrates how to prevent actions such as cut, paste, autofill, formatting, validation, and conditional formatting for specific cells(in the first and third columns) in the spreadsheet without protecting the sheet or making the cells read-only. You can also restrict additional actions by following the same approach.
+
+{% tabs %}
+{% highlight cshtml tabtitle="CSHTML" %}
+{% include code-snippet/spreadsheet/asp-net-mvc/prevent-actions-cs1/razor %}
+{% endhighlight %}
+{% highlight c# tabtitle="PreventActionController.cs" %}
+{% include code-snippet/spreadsheet/asp-net-mvc/change-active-sheet/PreventActionController.cs %}
+{% endhighlight %}
+{% endtabs %}
+
+## See Also
+
+* [Protection](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-mvc/protect-sheet)
\ No newline at end of file
diff --git a/Document-Processing/Excel/Spreadsheet/Angular/how-to/prevent-actions.md b/Document-Processing/Excel/Spreadsheet/Angular/how-to/prevent-actions.md
new file mode 100644
index 0000000000..d29cc3ed1d
--- /dev/null
+++ b/Document-Processing/Excel/Spreadsheet/Angular/how-to/prevent-actions.md
@@ -0,0 +1,54 @@
+---
+layout: post
+title: Prevent actions without read-only and sheet protection | Syncfusion
+description: Learn here all about to prevent actions without read-only and sheet protection in Angular Spreadsheet component of Syncfusion Essential JS 2 and more.
+control: Spreadsheet
+platform: document-processing
+documentation: ug
+---
+
+# Prevent actions without read-only and protection in Angular Spreadsheet
+
+In Syncfusion Angular Spreadsheet, the [**read-only**](https://help.syncfusion.com/document-processing/excel/spreadsheet/angular/protect-sheet#make-cells-read-only-without-protecting-worksheet) feature makes a range of cells, rows, or columns completely non-editable and restricts all spreadsheet actions on those cells. Similarly, the [**sheet protection**](https://help.syncfusion.com/document-processing/excel/spreadsheet/angular/protect-sheet#protect-sheet) feature locks the entire sheet and restricts all spreadsheet actions on the sheet. It does not allow actions such as formatting cells, rows, or columns, selecting cells, or inserting hyperlinks—unless these options are explicitly enabled in the [`protectSettings`](https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/protectsettingsmodel).
+
+If your requirement is to prevent actions (such as cut, paste, autofill, formatting, and validation) without locking the entire sheet using the [`protectSheet`](https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/index-default#protectsheet) method or making the cells read-only via the [`setRangeReadOnly`](https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/index-default#setrangereadonly) method, you can achieve this through event-based customization. This approach allows you to restrict specific actions on selected cells while keeping the rest of the sheet fully interactive.
+
+**Events to Use**
+To achieve this requirement, the following events can be used:
+
+* [`cellEdit`](https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/index-default#celledit) → To prevent editing for specific cells.
+* [`actionBegin`](https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/index-default#actionbegin)→ To prevent spreadsheet actions such as cut, paste, autofill, formatting, etc.
+
+**Step 1: Prevent editing for specific cells**
+
+To prevent editing for specific cells, use the [`cellEdit`](https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/index-default#celledit) event, which triggers whenever a cell enters edit mode. By checking the column index and setting `args.cancel = true`, you can prevent editing for those columns. This ensures that users cannot modify the cell content in those columns.
+
+**Step 2: Prevent specific spreadsheet actions**
+
+To prevent specific action after preventing the cell editing, you need to use the [`actionBegin`](https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/index-default#actionbegin) event. This event triggers before any action starts (such as cut, paste, autofill, formatting, etc.). In this event:
+
+* Fetch the target address based on the type of action being performed using `args.action` property.
+* Verify if the target range includes the restricted columns.
+* If the column is in the restricted list, cancel the action by setting `args.cancel = true`.
+
+This approach ensures that spreadsheet actions such as cut, paste, autofill, formatting, validation, and conditional formatting are prevented for specific cells without protecting the sheet or making the cells read-only.
+
+ > **Note:** In this example, we use column indexes to restrict actions. You can also use row indexes or cell addresses for the same purpose.
+
+The following example demonstrates how to prevent actions such as cut, paste, autofill, formatting, validation, and conditional formatting for specific cells(in the first and third columns) in the spreadsheet without protecting the sheet or making the cells read-only. You can also restrict additional actions by following the same approach.
+
+{% tabs %}
+{% highlight ts tabtitle="app.component.ts" %}
+{% include code-snippet/spreadsheet/angular/prevent-actions-cs1/src/app.component.ts %}
+{% endhighlight %}
+{% highlight ts tabtitle="main.ts" %}
+{% include code-snippet/spreadsheet/angular/prevent-actions-cs1/src/main.ts %}
+{% endhighlight %}
+{% endtabs %}
+
+
+{% previewsample "/document-processing/code-snippet/spreadsheet/angular/prevent-actions-cs1" %}
+
+## See Also
+
+* [Protection](https://help.syncfusion.com/document-processing/excel/spreadsheet/angular/protect-sheet)
\ No newline at end of file
diff --git a/Document-Processing/Excel/Spreadsheet/Javascript-ES5/how-to/prevent-actions.md b/Document-Processing/Excel/Spreadsheet/Javascript-ES5/how-to/prevent-actions.md
new file mode 100644
index 0000000000..82ae101a2f
--- /dev/null
+++ b/Document-Processing/Excel/Spreadsheet/Javascript-ES5/how-to/prevent-actions.md
@@ -0,0 +1,54 @@
+---
+layout: post
+title: Prevent actions without read-only and sheet protection | Syncfusion
+description: Learn here all about to prevent actions without read-only and sheet protection in Javascript Spreadsheet component of Syncfusion Essential JS 2 and more.
+control: Spreadsheet
+platform: document-processing
+documentation: ug
+---
+
+# Prevent actions without read-only and protection in Javascript Spreadsheet
+
+In Syncfusion Javascript Spreadsheet, the [**read-only**](https://help.syncfusion.com/document-processing/excel/spreadsheet/javascript-es5/protect-sheet#make-cells-read-only-without-protecting-worksheet) feature makes a range of cells, rows, or columns completely non-editable and restricts all spreadsheet actions on those cells. Similarly, the [**sheet protection**](https://help.syncfusion.com/document-processing/excel/spreadsheet/javascript-es5/protect-sheet#protect-sheet) feature locks the entire sheet and restricts all spreadsheet actions on the sheet. It does not allow actions such as formatting cells, rows, or columns, selecting cells, or inserting hyperlinks—unless these options are explicitly enabled in the [`protectSettings`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/protectsettingsmodel).
+
+If your requirement is to prevent actions (such as cut, paste, autofill, formatting, and validation) without locking the entire sheet using the [`protectSheet`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#protectsheet) method or making the cells read-only via the [`setRangeReadOnly`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#setrangereadonly) method, you can achieve this through event-based customization. This approach allows you to restrict specific actions on selected cells while keeping the rest of the sheet fully interactive.
+
+**Events to Use**
+To achieve this requirement, the following events can be used:
+
+* [`cellEdit`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#celledit) → To prevent editing for specific cells.
+* [`actionBegin`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#actionbegin)→ To prevent spreadsheet actions such as cut, paste, autofill, formatting, etc.
+
+**Step 1: Prevent editing for specific cells**
+
+To prevent editing for specific cells, use the [`cellEdit`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#celledit) event, which triggers whenever a cell enters edit mode. By checking the column index and setting `args.cancel = true`, you can prevent editing for those columns. This ensures that users cannot modify the cell content in those columns.
+
+**Step 2: Prevent specific spreadsheet actions**
+
+To prevent specific action after preventing the cell editing, you need to use the [`actionBegin`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#actionbegin) event. This event triggers before any action starts (such as cut, paste, autofill, formatting, etc.). In this event:
+
+* Fetch the target address based on the type of action being performed using `args.action` property.
+* Verify if the target range includes the restricted columns.
+* If the column is in the restricted list, cancel the action by setting `args.cancel = true`.
+
+This approach ensures that spreadsheet actions such as cut, paste, autofill, formatting, validation, and conditional formatting are prevented for specific cells without protecting the sheet or making the cells read-only.
+
+ > **Note:** In this example, we use column indexes to restrict actions. You can also use row indexes or cell addresses for the same purpose.
+
+The following example demonstrates how to prevent actions such as cut, paste, autofill, formatting, validation, and conditional formatting for specific cells(in the first and third columns) in the spreadsheet without protecting the sheet or making the cells read-only. You can also restrict additional actions by following the same approach.
+
+{% tabs %}
+{% highlight ts tabtitle="app.component.ts" %}
+{% include code-snippet/spreadsheet/javascript-es5/prevent-actions-cs1/src/app.component.ts %}
+{% endhighlight %}
+{% highlight ts tabtitle="main.ts" %}
+{% include code-snippet/spreadsheet/javascript-es5/prevent-actions-cs1/src/main.ts %}
+{% endhighlight %}
+{% endtabs %}
+
+
+{% previewsample "/document-processing/code-snippet/spreadsheet/javascript-es5/prevent-actions-cs1" %}
+
+## See Also
+
+* [Protection](https://help.syncfusion.com/document-processing/excel/spreadsheet/javascript-es5/protect-sheet)
\ No newline at end of file
diff --git a/Document-Processing/Excel/Spreadsheet/Javascript-ES6/how-to/prevent-actions.md b/Document-Processing/Excel/Spreadsheet/Javascript-ES6/how-to/prevent-actions.md
new file mode 100644
index 0000000000..6d46a75b32
--- /dev/null
+++ b/Document-Processing/Excel/Spreadsheet/Javascript-ES6/how-to/prevent-actions.md
@@ -0,0 +1,54 @@
+---
+layout: post
+title: Prevent actions without read-only and sheet protection | Syncfusion
+description: Learn here all about to prevent actions without read-only and sheet protection in Typescript Spreadsheet component of Syncfusion Essential JS 2 and more.
+control: Spreadsheet
+platform: document-processing
+documentation: ug
+---
+
+# Prevent actions without read-only and protection in Typescript Spreadsheet
+
+In Syncfusion Typescript Spreadsheet, the [**read-only**](https://help.syncfusion.com/document-processing/excel/spreadsheet/javascript-es6/protect-sheet#make-cells-read-only-without-protecting-worksheet) feature makes a range of cells, rows, or columns completely non-editable and restricts all spreadsheet actions on those cells. Similarly, the [**sheet protection**](https://help.syncfusion.com/document-processing/excel/spreadsheet/javascript-es6/protect-sheet#protect-sheet) feature locks the entire sheet and restricts all spreadsheet actions on the sheet. It does not allow actions such as formatting cells, rows, or columns, selecting cells, or inserting hyperlinks—unless these options are explicitly enabled in the [`protectSettings`](https://ej2.syncfusion.com/documentation/api/spreadsheet/protectsettingsmodel).
+
+If your requirement is to prevent actions (such as cut, paste, autofill, formatting, and validation) without locking the entire sheet using the [`protectSheet`](https://ej2.syncfusion.com/documentation/api/spreadsheet/index-default#protectsheet) method or making the cells read-only via the [`setRangeReadOnly`](https://ej2.syncfusion.com/documentation/api/spreadsheet/index-default#setrangereadonly) method, you can achieve this through event-based customization. This approach allows you to restrict specific actions on selected cells while keeping the rest of the sheet fully interactive.
+
+**Events to Use**
+To achieve this requirement, the following events can be used:
+
+* [`cellEdit`](https://ej2.syncfusion.com/documentation/api/spreadsheet/index-default#celledit) → To prevent editing for specific cells.
+* [`actionBegin`](https://ej2.syncfusion.com/documentation/api/spreadsheet/index-default#actionbegin)→ To prevent spreadsheet actions such as cut, paste, autofill, formatting, etc.
+
+**Step 1: Prevent editing for specific cells**
+
+To prevent editing for specific cells, use the [`cellEdit`](https://ej2.syncfusion.com/documentation/api/spreadsheet/index-default#celledit) event, which triggers whenever a cell enters edit mode. By checking the column index and setting `args.cancel = true`, you can prevent editing for those columns. This ensures that users cannot modify the cell content in those columns.
+
+**Step 2: Prevent specific spreadsheet actions**
+
+To prevent specific action after preventing the cell editing, you need to use the [`actionBegin`](https://ej2.syncfusion.com/documentation/api/spreadsheet/index-default#actionbegin) event. This event triggers before any action starts (such as cut, paste, autofill, formatting, etc.). In this event:
+
+* Fetch the target address based on the type of action being performed using `args.action` property.
+* Verify if the target range includes the restricted columns.
+* If the column is in the restricted list, cancel the action by setting `args.cancel = true`.
+
+This approach ensures that spreadsheet actions such as cut, paste, autofill, formatting, validation, and conditional formatting are prevented for specific cells without protecting the sheet or making the cells read-only.
+
+ > **Note:** In this example, we use column indexes to restrict actions. You can also use row indexes or cell addresses for the same purpose.
+
+The following example demonstrates how to prevent actions such as cut, paste, autofill, formatting, validation, and conditional formatting for specific cells(in the first and third columns) in the spreadsheet without protecting the sheet or making the cells read-only. You can also restrict additional actions by following the same approach.
+
+{% tabs %}
+{% highlight ts tabtitle="app.component.ts" %}
+{% include code-snippet/spreadsheet/javascript-es6/prevent-actions-cs1/src/app.component.ts %}
+{% endhighlight %}
+{% highlight ts tabtitle="main.ts" %}
+{% include code-snippet/spreadsheet/javascript-es6/prevent-actions-cs1/src/main.ts %}
+{% endhighlight %}
+{% endtabs %}
+
+
+{% previewsample "/document-processing/code-snippet/spreadsheet/javascript-es6/prevent-actions-cs1" %}
+
+## See Also
+
+* [Protection](https://help.syncfusion.com/document-processing/excel/spreadsheet/javascript-es6/protect-sheet)
\ No newline at end of file
diff --git a/Document-Processing/Excel/Spreadsheet/Vue/how-to/prevent-actions.md b/Document-Processing/Excel/Spreadsheet/Vue/how-to/prevent-actions.md
new file mode 100644
index 0000000000..90a90d4df7
--- /dev/null
+++ b/Document-Processing/Excel/Spreadsheet/Vue/how-to/prevent-actions.md
@@ -0,0 +1,53 @@
+---
+layout: post
+title: Prevent actions without read-only and sheet protection | Syncfusion
+description: Learn here all about to prevent actions without read-only and sheet protection in Vue Spreadsheet component of Syncfusion Essential JS 2 and more.
+control: Spreadsheet
+platform: document-processing
+documentation: ug
+---
+
+# Prevent actions without read-only and protection in Vue Spreadsheet
+
+In Syncfusion Vue Spreadsheet, the [**read-only**](https://help.syncfusion.com/document-processing/excel/spreadsheet/vue/protect-sheet#make-cells-read-only-without-protecting-worksheet) feature makes a range of cells, rows, or columns completely non-editable and restricts all spreadsheet actions on those cells. Similarly, the [**sheet protection**](https://help.syncfusion.com/document-processing/excel/spreadsheet/vue/protect-sheet#protect-sheet) feature locks the entire sheet and restricts all spreadsheet actions on the sheet. It does not allow actions such as formatting cells, rows, or columns, selecting cells, or inserting hyperlinks—unless these options are explicitly enabled in the [`protectSettings`](https://ej2.syncfusion.com/vue/documentation/api/spreadsheet/protectsettingsmodel).
+
+If your requirement is to prevent actions (such as cut, paste, autofill, formatting, and validation) without locking the entire sheet using the [`protectSheet`](https://ej2.syncfusion.com/vue/documentation/api/spreadsheet/index-default#protectsheet) method or making the cells read-only via the [`setRangeReadOnly`](https://ej2.syncfusion.com/vue/documentation/api/spreadsheet/index-default#setrangereadonly) method, you can achieve this through event-based customization. This approach allows you to restrict specific actions on selected cells while keeping the rest of the sheet fully interactive.
+
+**Events to Use**
+To achieve this requirement, the following events can be used:
+
+* [`cellEdit`](https://ej2.syncfusion.com/vue/documentation/api/spreadsheet/index-default#celledit) → To prevent editing for specific cells.
+* [`actionBegin`](https://ej2.syncfusion.com/vue/documentation/api/spreadsheet/index-default#actionbegin)→ To prevent spreadsheet actions such as cut, paste, autofill, formatting, etc.
+
+**Step 1: Prevent editing for specific cells**
+
+To prevent editing for specific cells, use the [`cellEdit`](https://ej2.syncfusion.com/vue/documentation/api/spreadsheet/index-default#celledit) event, which triggers whenever a cell enters edit mode. By checking the column index and setting `args.cancel = true`, you can prevent editing for those columns. This ensures that users cannot modify the cell content in those columns.
+
+**Step 2: Prevent specific spreadsheet actions**
+
+To prevent specific action after preventing the cell editing, you need to use the [`actionBegin`](https://ej2.syncfusion.com/vue/documentation/api/spreadsheet/index-default#actionbegin) event. This event triggers before any action starts (such as cut, paste, autofill, formatting, etc.). In this event:
+
+* Fetch the target address based on the type of action being performed using `args.action` property.
+* Verify if the target range includes the restricted columns.
+* If the column is in the restricted list, cancel the action by setting `args.cancel = true`.
+
+This approach ensures that spreadsheet actions such as cut, paste, autofill, formatting, validation, and conditional formatting are prevented for specific cells without protecting the sheet or making the cells read-only.
+
+ > **Note:** In this example, we use column indexes to restrict actions. You can also use row indexes or cell addresses for the same purpose.
+
+The following example demonstrates how to prevent actions such as cut, paste, autofill, formatting, validation, and conditional formatting for specific cells(in the first and third columns) in the spreadsheet without protecting the sheet or making the cells read-only. You can also restrict additional actions by following the same approach.
+
+{% tabs %}
+{% highlight html tabtitle="Composition API (~/src/App.vue)" %}
+{% include code-snippet/spreadsheet/vue/prevent-actions-cs1/app-composition.vue %}
+{% endhighlight %}
+{% highlight html tabtitle="Options API (~/src/App.vue)" %}
+{% include code-snippet/spreadsheet/vue/prevent-actions-cs1/app.vue %}
+{% endhighlight %}
+{% endtabs %}
+
+{% previewsample "/document-processing/code-snippet/spreadsheet/vue/prevent-actions-cs1" %}
+
+## See Also
+
+* [Protection](https://help.syncfusion.com/document-processing/excel/spreadsheet/vue/protect-sheet)
\ No newline at end of file
diff --git a/Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/angular.json b/Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/angular.json
new file mode 100644
index 0000000000..9e4e688ef3
--- /dev/null
+++ b/Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/angular.json
@@ -0,0 +1,74 @@
+{
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+ "version": 1,
+ "cli": {
+ "packageManager": "npm"
+ },
+ "newProjectRoot": "projects",
+ "projects": {
+ "my-app": {
+ "projectType": "application",
+ "schematics": {},
+ "root": "",
+ "sourceRoot": "src",
+ "prefix": "app",
+ "architect": {
+ "build": {
+ "builder": "@angular/build:application",
+ "options": {
+ "browser": "src/main.ts",
+ "index": "index.html",
+ "tsConfig": "tsconfig.app.json",
+ "assets": [
+ {
+ "glob": "**/*",
+ "input": "public"
+ }
+ ],
+ "styles": [
+ "src/styles.css"
+ ]
+ },
+ "configurations": {
+ "production": {
+ "budgets": [
+ {
+ "type": "initial",
+ "maximumWarning": "500kB",
+ "maximumError": "1MB"
+ },
+ {
+ "type": "anyComponentStyle",
+ "maximumWarning": "4kB",
+ "maximumError": "8kB"
+ }
+ ],
+ "outputHashing": "all"
+ },
+ "development": {
+ "optimization": false,
+ "extractLicenses": false,
+ "sourceMap": true
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "builder": "@angular/build:dev-server",
+ "configurations": {
+ "production": {
+ "buildTarget": "my-app:build:production"
+ },
+ "development": {
+ "buildTarget": "my-app:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
+ },
+ "test": {
+ "builder": "@angular/build:unit-test"
+ }
+ }
+ }
+ }
+}
diff --git a/Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/index.html b/Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/index.html
new file mode 100644
index 0000000000..ace26b00a4
--- /dev/null
+++ b/Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+ MyApp
+
+
+
+
+
+
+
+
diff --git a/Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/src/app.component.ts b/Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/src/app.component.ts
new file mode 100644
index 0000000000..208b88e8e8
--- /dev/null
+++ b/Document-Processing/code-snippet/spreadsheet/angular/prevent-actions-cs1/src/app.component.ts
@@ -0,0 +1,93 @@
+import { NgModule } from '@angular/core'
+import { BrowserModule } from '@angular/platform-browser'
+import { getCellIndexes, getRangeIndexes, SpreadsheetAllModule } from '@syncfusion/ej2-angular-spreadsheet'
+
+
+
+import { Component, ViewChild } from '@angular/core';
+import { SpreadsheetComponent } from '@syncfusion/ej2-angular-spreadsheet';
+import { enableRipple } from '@syncfusion/ej2-base';
+import { defaultData } from './datasource';
+
+enableRipple(true);
+
+@Component({
+imports: [
+
+ SpreadsheetAllModule
+ ],
+
+
+standalone: true,
+ selector: 'app-container',
+ template: `