Spread for ASP.NET 9.0 Product Documentation
Understanding How the Models Work

To understand how models work, think of the sheet (SheetView object) as a composite of the five underlying models:

Sheet Model Classes and Interface Description
Axis model

BaseSheetAxisModel

DefaultSheetAxisModel

ISheetAxisModel

Basis for how the sheet’s rows and columns are structured. For more information, see Understanding the Axis Model.
Data model

BaseSheetDataModel

DefaultSheetDataModel

ISheetDataModel

Basis for the data in the cells in the sheet. For more information, see Understanding the Data Model.
Selection model

BaseSheetSelectionModel

DefaultSheetSelectionModel

ISheetSelectionModel

Basis for the behavior of and interaction of selected cells in the sheet. For more information, see Understanding the Selection Model.
Span model

BaseSheetSpanModel

DefaultSheetSpanModel

ISheetSpanModel

Basis for how cells in the sheet are spanned. For more information, see Understanding the Span Model.
Style model

BaseSheetStyleModel

DefaultSheetStyleModel

ISheetStyleModel

Basis for the appearance of the cells in the sheet. For more information, see Understanding the Style Model.

Everything you do to the model is automatically updated in the sheet and most of the aspects of the sheet that you can modify are updated in the model. This is also true for Cell, Row, and Column object settings. Most of the aspects changed with these objects automatically change the setting in the corresponding sheet model and vice versa; for example, if you add columns to the data model, then they are added to the sheet. This is true even for the parameters; for example, the row and column arguments in the GetValue and SetValue methods for the data model are the same indexes as that of the rows and columns in the sheet as long as the sheet is not sorted.

As shown in the figure in Using Sheet Models, the component is considered to have four quadrants. The data area of the spreadsheet is considered one sheet with its own set of models, and the row headers, column headers, and corner are considered as separate sheets, each with their own models.

Not everything in the Spread namespace is in the models. For example, there are aspects of the overall component, such as the sheet tabs, the sheet background color, and the grid lines, that are not in the models. But the relevant information about a given cell, both about the data in the cells and about the appearance of the cells, is in the models.

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback