Skip to main content
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

StyleCollection.Hide(Style) Method

Marks the specified style as deleted, so it can no longer be applied to cells.

Namespace: DevExpress.Spreadsheet

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

NuGet Package: DevExpress.Spreadsheet.Core

#Declaration

void Hide(
    Style style
)

#Parameters

Name Type Description
style Style

A Style object that is a cell style to be hidden in the collection.

#Remarks

A hidden style object is not deleted from the workbook’s collection of styles, but this style can no longer be applied to cells. If there are cells formatted with a style that you then hide, the Normal style (StyleCollection.DefaultStyle) will be automatically applied to that cells. If you try to apply a hidden style to cells in code, an exception occurs.

A hidden style object can be accessed and modified in code. To restore a hidden style in the collection, use the StyleCollection.Unhide method.

For more information on how to work with cell styles, refer to the How to: Apply a Style to a Cell or Range of Cells and How to: Create or Modify a Style examples.

See Also