Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+
Row

ChartSheet.IsProtected Property

Gets a value indicating whether the chart sheet is protected.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.1.Core.dll

Declaration

bool IsProtected { get; }

Property Value

Type Description
Boolean

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

Remarks

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

Example

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

The following code snippets (auto-collected from DevExpress Examples) contain references to the IsProtected property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also