New to Telerik Document ProcessingStart a free 30-day trial

Number format pattern for displaying cell values; applies format strings to control how numbers, dates, times, and text appear in cells.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public class CellValueFormat

Inheritance: objectCellValueFormat

Constructors

Initializes a new CellValueFormat with the specified format pattern string.

C#
public CellValueFormat(string formatString)
Parameters:formatStringstring

The format string.

Fields

Default general format that displays values without any special formatting rules.

C#
public static readonly CellValueFormat GeneralFormat

Methods

Determines whether the specified object is equal to the current object.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current object.

Returns:

bool

True if the specified object is equal to the current object; otherwise, false.

Overrides: object.Equals(object)

Applies this format to a cell value and returns the formatted result with color, culture, and condition information.

C#
public CellValueFormatResult GetFormatResult(ICellValue cellValue)
Parameters:cellValueICellValue

The cell value.

Returns:

CellValueFormatResult

The format result.

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

Operators

Determines whether two cell value formats are not equal by comparing their format strings.

C#
public static bool operator !=(CellValueFormat first, CellValueFormat second)
Parameters:firstCellValueFormat

The first value.

secondCellValueFormat

The second value.

Returns:

bool

The result of the operator.

Determines whether two cell value formats are equal by comparing their format strings.

C#
public static bool operator ==(CellValueFormat first, CellValueFormat second)
Parameters:firstCellValueFormat

The first value.

secondCellValueFormat

The second value.

Returns:

bool

The result of the operator.

Properties

Format pattern string that controls how cell values are displayed.

C#
public string FormatString { get; }
Property Value:

The format string.

Metadata about the format string including its category and type.

C#
public FormatStringInfo FormatStringInfo { get; }
Property Value:

The format string information.