[]
        
(Showing Draft Content)

FarPoint.Win.Spread.Model.DefaultSheetDataModel

DefaultSheetDataModel Class

Represents the full (concrete) implementation of the ISheetDataModel interface for a data model for a sheet, which represents tabular data on a sheet.

Inheritance
DefaultSheetDataModel
Namespace: FarPoint.Win.Spread.Model
Assembly: FarPoint.Win.Spread.dll
Syntax
public class DefaultSheetDataModel : BaseSheetDataModel, ISheetDataModel, INonEmptyCells, IChartSupport, IArraySupport, IChildModelSupport, IRangeSupport, IExpressionSupport2, ICalculationSupport, IIterationSupport, ICustomFunctionSupport, ICustomFunctionSupport2, ISerializable, ICanSerializeXml, ISerializeSupport, ISerializeData, IEditableObjectSupport, IDataSourceSupport, INameSupport2, INameSupport, IItemTypeSupport, IUnboundRowAddNewRowSupport, IUnboundRowSupport, IClearDataSupport, IClearFormulasSupport, IEnhancedCustomNameSupport2, ICustomNameSupport3, IEnhancedCustomNameSupport, ICustomNameSupport, ICustomNameSupport2, IOptimizedEnumerationSupport7, IErrorTextSupport, ITableModelSupport, ISuspendFormulaParsing, IOptimizedEnumerationSupport6, IOptimizedEnumerationSupport5, IOptimizedEnumerationSupport3, IOptimizedEnumerationSupport2, IOptimizedEnumerationSupport, IObjectExpressionSupport, IExpressionSupport, IDataSourceSupport1
Public Class DefaultSheetDataModel
    Inherits BaseSheetDataModel
    Implements ISheetDataModel, INonEmptyCells, IChartSupport, IArraySupport, IChildModelSupport, IRangeSupport, IExpressionSupport2, ICalculationSupport, IIterationSupport, ICustomFunctionSupport, ICustomFunctionSupport2, ISerializable, ICanSerializeXml, ISerializeSupport, ISerializeData, IEditableObjectSupport, IDataSourceSupport, INameSupport2, INameSupport, IItemTypeSupport, IUnboundRowAddNewRowSupport, IUnboundRowSupport, IClearDataSupport, IClearFormulasSupport, IEnhancedCustomNameSupport2, ICustomNameSupport3, IEnhancedCustomNameSupport, ICustomNameSupport, ICustomNameSupport2, IOptimizedEnumerationSupport7, IErrorTextSupport, ITableModelSupport, ISuspendFormulaParsing, IOptimizedEnumerationSupport6, IOptimizedEnumerationSupport5, IOptimizedEnumerationSupport3, IOptimizedEnumerationSupport2, IOptimizedEnumerationSupport, IObjectExpressionSupport, IExpressionSupport, IDataSourceSupport1

Constructors

Name Description
DefaultSheetDataModel()

Creates a default data model with zero rows and columns.

DefaultSheetDataModel(IList, Type)

Creates a default data model with the specified data set (IList object).

DefaultSheetDataModel(IListSource, Type)

Creates a default data model with the specified data set (IListSource object).

DefaultSheetDataModel(DataSet)

Creates a default data model with the specified data set.

DefaultSheetDataModel(DataSet, string)

Creates a default data model with the specified data set.

DefaultSheetDataModel(DataTable)

Creates a default data model with the specified data table.

DefaultSheetDataModel(int, int)

Creates a default data model with the specified number of rows and columns.

DefaultSheetDataModel(SerializationInfo, StreamingContext)

Creates a new DefaultSheetDataModel from the SerializationInfo object.

Properties

Name Description
AutoCalculation

Gets or sets whether the control automatically recalculates each formula in the sheet when the contents of dependent cells change.

AutoGenerateColumns

Gets or sets whether to generate the columns automatically based on the data source.

CanSerializeXml

Gets whether the object in its entirety can be rendered with XML without losing any information.

ChildRelationCount

Gets the number of the child data relations for a hierarchical display of data.

ColumnCount

Gets or sets the number of columns in the model.

DataMember

Gets or sets the data member (table name) to use for data.

DataSource

Gets or sets the data source.

EnumErrorText

Internal use only. Specifies the enumerator error text.

EnumFormulas

Internal use only. Specifies the enumerator formulas.

EnumNotes

Internal use only. Specifies the enumerator notes.

EnumRowErrorText

Internal use only. Specifies the enumerator row error text.

EnumRowFormulas

Internal use only. Specifies the enumerator row formulas.

EnumTags

Internal use only. Specifies the enumerator tags.

EnumValues

Internal use only. Specifies the enumerator values.

IgnoreFormula

Gets or sets a value that indicates whether to ignore the formula.

ItemType

Gets or sets the type of the object in the list for the list data source.

Iteration

Gets or sets whether circular references are evaluated.

MaximumChange

Gets or sets the maximum amount of change below which to stop iterating for caclulations with circular references.

MaximumIterations

Gets or sets the maximum number of iterations for calculations with circular references.

Name

Gets or sets the name of the data model.

NonEmptyColumnCount

Gets the number of columns in the model that contain data (bound or unbound).

NonEmptyRowCount

Gets the number of rows in the model that contain data (bound or unbound).

Parent

Gets or sets the parent data source support object.

ParentRelationName

Gets the name of the data relation being used for a hierarchical display of data.

ParentRowIndex

Gets the index of the row in the parent data model associated with this child data model.

ReferenceStyle

Gets or sets the cell reference style for cells with formulas.

RowCount

Gets or sets the number of rows in the model.

UnionedChangeCellRange

Gets or sets whether the changed event occurs for each cell range or for the union range. True fires the event for the union range.

Methods

Name Description
AddColumn()

Adds a column to the data model after the last column.

AddColumn(int)

Adds a column to the data model at the specified position.

AddColumns(int, int)

Adds one or more columns to the data model at the specified position.

AddCustomName(string, string, int, int)

Adds a named expression to the model for use in formulas.

AddCustomName(string, string, int, int, string)

Adds a new user-defined name to the model using the specified string value.

AddModelScopeCustomName(string, string, int, int, string)

Adds a custom name to the model scope.

AddRow()

Adds a row to the data model after the last row.

AddRow(int)

Adds a row to the data model at the specified position.

AddRowToDataSource(int, bool)

Adds the unbound row to the data source.

AddRows(int, int)

Adds rows to the data model at the specified position.

AddUnboundRows(int, int)

Adds unbound rows to the data model.

CheckModelScopeName(string)

Checks if the specified name is one of the model scope custom names of this data model and returns the name of the custom name in the data model.

CheckName(string)

Checks if the specified name is one of the common scope custom names of this data model and returns the name of the custom name in the data model.

Clear(int, int, int, int)

Removes all the data and formulas from the specified range of cells.

ClearCustomFunctions()

Removes all user-defined custom functions from the model.

ClearCustomNames()

Removes all named expressions from the model.

ClearData(int, int, int, int)

Removes all the data from the specified range of cells.

ClearFormulas(int, int, int, int)

Removes all of the formulas from the specified range of cells.

ClearModelScopeCustomName()

Removes all named expressions from the model scope.

CompareExpression(Expression, Expression)

Gets whether two expressions are equal.

Copy(int, int, int, int, int, int)

Copies the data from a range of cells to a specified range of cells.

Deserialize(XmlNodeReader)

Loads the object from XML.

EvaluateExpression(int, int, Expression)

Evaluates the expression in the cell at the specified row and column and returns the resulting object.

FireChanged(int, int)

Raises the Changed event.

FireChanged(int, int, int, int)

Raises the Changed event.

FireChanged(int, int, int, int, SheetDataModelEventType)

Raises the Changed event.

GetArray(int, int, int, int)

Gets an object array from a specified range of cells.

GetArray(int, int, int, int, bool)

Gets an object array from a specified range of cells.

GetCellErrorText(int, int)

Gets a user-defined note value for the cell of the specified row and column.

GetChildDataModel(int, string)

Gets the data model (ISheetDataModel object) for the specified row and data relation.

GetChildRelation(int)

Gets the name of the child data relation at the specified position.

GetColumnIndex(string)

Gets the index of the column specified by name.

GetCustomName(string, int, int)

Gets a named expression from the model with the specified base index for relative cell references.

GetCustomNameComment(string)

Gets a comment for a common custom name.

GetCustomNameEnumerator()

Gets an IEnumerator that enumerates through the names of the named expressions in the model.

GetDataColumnCaption(int)

Gets the column caption at the specified position.

GetDataColumnFromModelColumn(int)

Gets the data source column index for the specified column in the model.

GetDataColumnName(int)

Gets the column name at the specified position.

GetDataColumnType(int)

Gets the column data type at the specified position.

GetDataRow(int)

Gets the view of a specified row of data.

GetDataRowFromModelRow(int)

Gets the data source row index for the specified row in the model.

GetDataTable()

Gets the data table associated with this model.

GetDataView()

Gets the DataView object associated with this model.

GetDataView(bool)

Gets the DataView object associated with this model.

GetFormula(int, int)

Gets the formula, as a string value, for the cell of the specified row and column.

GetItem(int)

Returns the IEditableObject from a row that is data bound to a DataView or ListSource.

GetListSource()

Returns the IList data source for this model or null if the data source is not an IList.

GetModelColumnFromDataColumn(int)

Gets the column in the model for the specified data source column.

GetModelRowFromDataRow(int)

Gets the row in the model for the specified data source row.

GetModelScopeCustomName(string, int, int)

Gets a named expression from the model with the specified base index for relative cell references.

GetModelScopeCustomNameComment(string)

Gets the comment from a custom name.

GetModelScopeNameEnumerator()

Gets an IEnumerator that enumerates through the names of the named expressions in the model.

GetNonEmptyErrorTextsColumnCount()

Gets the number of columns that contain notes.

GetNonEmptyErrorTextsRowCount()

Gets the number of rows that contain notes.

GetNonEmptyNotesColumnCount()

Gets the number of columns that contain notes.

GetNonEmptyNotesRowCount()

Gets the number of rows that contain notes.

GetNote(int, int)

Gets a user-defined note value for the cell of the specified row and column.

GetObjectData(SerializationInfo, StreamingContext)

Serializes the DefaultSheetDataModel to the SerializationInfo object.

GetRowErrorText(int)

Gets a user-defined error value for the cell of the specified row.

GetTag(int, int)

Gets an application-defined tag value for the cell of the specified row and column.

GetUnboundValue(int, int)

Gets the unbound value for the cell for the specified row and column.

GetValue(int, int)

Gets the value of the cell for the specified row and column.

GoalSeek(int, int, DefaultSheetDataModel, int, int, double)

Attempts to find a value for one cell that produces the desired formula result in another cell.

IsColumnBound(int)

Determines whether the specified column is bound to a data source column.

IsEditable(int, int)

Determines whether the value in the cell of the specified row and column can be edited.

IsEmpty()

Determines whether the data model is empty.

IsRowBound(int)

Determines whether the specified row is bound to a data source row.

IsRowUsed(int, bool, bool, bool)

Specifies whether the row uses a formula, tag, or note.

LoadFormulas(bool)

Loads formulas that are deserialized, but not parsed yet, to be used after all sheets have been created and deserialized.

ModifyCustomName(string, string)

Changes the name of the shared custom name.

ModifyModelScopeCustomName(string, string)

Modifies the name of a model scope custom name.

Move(int, int, int, int, int, int)

Moves the data from a range of cells to the specified location.

NextNonEmptyColumnFormula(int)

Returns the next non-empty column with a formula.

NextNonEmptyColumnInRow(int, int)

Gets the index of the next column in a specified row that contains data.

NextNonEmptyRow(int, ExcludeContents)

Returns the index of the next row that has data.

OnAggregate(AggregateArgs)

Raises the Changed event, and permits derived classes to handle the event without attaching a delegate.

OnChanged(SheetDataModelEventArgs)

Raises the Changed event, and permits derived classes to handle the event without attaching a delegate.

ParseFormula(int, int, string)

Parses the string value and returns the expression for the cell at the specified row and column.

PreviousNonEmptyColumnInRow(int, int)

Gets the previous non-empty column in the row.

PreviousNonEmptyColumnInRow(int, int, ExcludeContents)

Gets the previous non-empty column in the row.

PreviousNonEmptyRow(int)

Returns the previous non-empty row.

PreviousNonEmptyRow(int, ExcludeContents)

Gets the previous nonempty row.

Recalculate()

Evaluates the formulas in the sheet that have changed since the last calculation cycle.

RecalculateAll()

Evaluates all the formulas in the entire sheet (including those that have not changed since the last calculation cycle).

RemoveColumn(int)

Removes a column at the specified position.

RemoveColumns(int, int)

Removes one or more columns starting with the column at the specified position.

RemoveCustomName(string)

Removes a named expression from the model.

RemoveModelScopeCustomName(string)

Removes a custom name in the model scope.

RemoveRow(int)

Removes a row at the specified position.

RemoveRows(int, int)

Removes one or more rows, starting with the specified row.

ResumeFormulaParsing()

Resumes parsing of formulas and parses all formulas set while parsing was suspended.

Serialize(XmlTextWriter)

Saves the object to XML.

Serialize(XmlTextWriter, bool)

Saves the object to XML and specifies whether to save the data source and bound data.

SetArray(int, int, object[,])

Sets an object array into a specified range of cells.

SetArray(int, int, object[,], bool)

Sets an object array into a specified range of cells.

SetArray(int, int, object[,], bool, ReferenceStyle)

Sets an object array into a specified range of cells.

SetCellErrorText(int, int, string)

Sets a user-defined note value for the cell at the specified row and column.

SetCustomNameComment(string, string)

Sets a comment for a common custom name.

SetFormula(int, int, string)

Sets the formula, as a string value, for the cell of the specified row and column. If you pass null, it clears the expression from that cell.

SetModelDataColumn(int, int)

Binds the model column to a specified data source column.

SetModelDataColumn(int, string)

Binds a model column to a specified data source column.

SetModelScopeCustomNameComment(string, string)

Sets a custom name comment.

SetNote(int, int, string)

Sets a user-defined note value for the cell at the specified row and column.

SetRowErrorText(int, string)

Internal method to set row expression without triggering auto calculation.

SetTag(int, int, object)

Sets an application-defined tag value for the cell of the specified row and column.

SetValue(int, int, object)

Sets the value for the cell of the specified row and column.

SuspendFormulaParsing()

Suspends parsing of formulas.

Swap(int, int, int, int, int, int)

Swaps the specified ranges of cells.

UnparseFormula(int, int, Expression)

Gets the formula, as a string value, from the specified expression for the cell at the specified row and column.

Events

Name Description
Aggregate

Occurs when the data model aggregates.

CellErrorTextChanged

Occurs when the user makes a change to the model that affects the data of the sheet.

CustomNameChanged

Occurs when the custom name of the data model changes.

NameChanged

Occurs when the name of the data model changes.

NameChanging

Occurs when the name of the data model is changing.

ReferenceStyleChanged

Occurs when the reference style of the data model changes.

RowErrorTextChanged

Occurs when the user makes a change to the model that affects the data of the sheet.