.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

ChartSheet.IsProtected Property

Gets a value indicating whether the chart sheet is protected.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v20.2.Core.dll


bool IsProtected { get; }
ReadOnly Property IsProtected As Boolean

Property Value

Type Description

true, if the chart sheet is protected; otherwise, false.


Use the IsProtected property to check whether the chart sheet is already protected before applying protection with the ChartSheet.Protect method.


Dim worksheet As Worksheet = workbook.Worksheets("chartTask1")

' Create a chart sheet containing a pie chart.
Dim chartSheet As ChartSheet = workbook.ChartSheets.Add(ChartType.Pie, worksheet("B2:C7"))

' Protect the chart sheet. Prevent end-users from making changes to chart elements.
If Not chartSheet.IsProtected Then
    chartSheet.Protect("password", ChartSheetProtection.Default)
End If

workbook.ChartSheets.ActiveChartSheet = chartSheet
See Also