Blazor Spreadsheet Example - Protection

Spreadsheet / Protection

This sample demonstrates the worksheet and workbook protection features of the Blazor Spreadsheet component, using a product inventory dataset as an example. The Spreadsheet contains information for category, product name, quantity per unit, and stock details, where protection is used to prevent unintended edits to the data.

Loading Syncfusion Blazor Server Demos…

ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMAN
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Category NameProduct NameQuantity per UnitUnits in StockDiscontinued
BeveragesChai10 boxes x 20 bags39True
BeveragesChang24 - 12 oz bottles17True
BeveragesChartreuse verte750 cc per bottle69True
BeveragesCte de Blaye12 - 75 cl bottles17False
BeveragesIpoh Coffee16 - 500 g tins17True
BeveragesLakkalikri500 ml57True
BeveragesLaughing Lumberjack Lager24 - 12 oz bottles52False
BeveragesOutback Lager24 - 355 ml bottles15False
BeveragesRhnbru Klosterbier24 - 0.5 l bottles125False
BeveragesSasquatch Ale24 - 12 oz bottles111True
BeveragesSteeleye Stout24 - 12 oz bottles20True
CondimentsAniseed Syrup12 - 550 ml bottles13True
CondimentsChef Anton's Cajun Seasoning48 - 6 oz jars53False
CondimentsGenen Shouyu24 - 250 ml bottles39False
CondimentsGrandma's Boysenberry Spread12 - 8 oz jars120False
CondimentsGula Malacca20 - 2 kg bags27True
CondimentsLouisiana Fiery Hot Pepper Sauce32 - 8 oz bottles76False
CondimentsLouisiana Hot Spiced Okra24 - 8 oz jars4False
CondimentsNorthwoods Cranberry Sauce12 - 12 oz jars6True
CondimentsOriginal Frankfurter grne Soe12 boxes32False
CondimentsSirop d'rable24 - 500 ml bottles113False
CondimentsVegie-spread15 - 625 g jars24False
ConfectionsChocolade10 pkgs.15True
ConfectionsGumbr Gummibrchen100 - 250 g bags15False
ConfectionsMaxilaku24 - 50 g pkgs.10False
ConfectionsNuNuCa Nu-Nougat-Creme20 - 450 g glasses76True
ConfectionsPavlova32 - 500 g boxes29True
ConfectionsSchoggi Schokolade100 - 100 g pieces49True
ConfectionsScottish Longbreads10 boxes x 8 pieces6True
ConfectionsSir Rodney's Marmalade30 gift boxes40True
ConfectionsSir Rodney's Scones24 pkgs. x 4 pieces3True
ConfectionsTarte au sucre48 pies17False
ConfectionsTeatime Chocolate Biscuits10 boxes x 12 pieces25False
ConfectionsValkoinen suklaa12 - 100 g bars65False
ConfectionsZaanse koeken10 - 4 oz boxes36True
Dairy CategoriesCamembert Pierrot15 - 300 g rounds19False
Dairy CategoriesFlotemysost10 - 500 g pkgs.26False
Dairy CategoriesGeitost500 g112False
Dairy CategoriesGorgonzola Telino12 - 100 g pkgs0True
Dairy CategoriesGudbrandsdalsost10 kg pkg.26True
Dairy CategoriesMascarpone Fabioli24 - 200 g pkgs.9True
Dairy CategoriesMozzarella di Giovanni24 - 200 g pkgs.14True
Dairy CategoriesQueso Cabrales1 kg pkg.22True
Dairy CategoriesQueso Manchego La Pastora10 - 500 g pkgs.86True
Dairy CategoriesRaclette Courdavault5 kg pkg.79False
Grains/CerealsFilo Mix16 - 2 kg boxes38False
Grains/CerealsGnocchi di nonna Alice24 - 250 g pkgs.21False
Grains/CerealsGustaf's Knckebrd24 - 500 g pkgs.104True

In this sample, the worksheet is protected with a password to restrict editing. To unprotect the sheet, click the Unprotect Sheet button in the Review tab and enter the password 123 in the dialog box.

The protect sheets feature prevents users from modifying cell contents, while the protect workbook feature secures the structure of the workbook itself. These protection options can be accessed through the Review tab in the ribbon interface.

The unlock range option allows you to define specific cell ranges that users can edit, even when the sheet is protected.

The Sheet Options section allows you to configure which actions are permitted for users on a protected sheet.

More information on the Blazor Spreadsheet can be found in this documentation section.

Transform your Blazor web apps today with Syncfusion® Blazor components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE