Saturday, October 11, 2008
HOME
.NET Product Center
SPREAD FOR .NET BUNDLE
SPREAD FOR WINDOWS FORMS
SPREAD FOR ASP.NET
INPUT PRO FOR WIN FORMS
SUBSCRIPTIONS
SOA Center
SPREAD FOR BIZTALK SERVER
SPREAD FOR SHAREPOINT SERVER
COM Product Center
DEVELOPER TOOLBOX
DATABASE PACK
SPREAD
TAB PRO
INPUT PRO
LIST PRO
CALENDAR OBJX
BUTTON OBJX
Download Center
TRIALS
UPDATES
Purchase Center
ORDER NOW
GOVT / GSA
LICENSE AGREEMENT
WORLDWIDE RESELLERS
CORPORATE DISCOUNTS
WHY BUY?
Support Center
TECHNICAL SUPPORT
FORUM
SUPPORT OPTIONS
VIDEO LIBRARY
SECTION 508
TRAINING CLASSES
Our Company
CUSTOMERS SAY...
ABOUT US
CONTACT US
JOB OPENINGS
AWARDS
CASE STUDIES
WHY CHOOSE FARPOINT
FarPoint Technologies
(800) 645-5913
fpsales@fpoint.com
»
Spread for Windows Forms
»
Product Tour
»
Models
»
Axis
Understanding the Axis Model
Back to Top
Axis Model
The axis model includes the methods that manage row- and column-related settings of the spreadsheet, that is, how the rows and columns of cells are oriented on the sheet. This includes many of the axis-related settings in the following shortcut objects: Column, Columns; Row, Rows; AlternatingRow, AlternatingRows. These settings include:
row height
column width
row visible
column visible
To use the underlying axis model, use the methods of the axis model. These include the SetSize method, for setting the row height or column width, and the SetVisible method for setting the row or column visible properties. There are other methods, too, such as SetMergePolicy, which set specific properties of the row or column, in this case whether cells can be automatically merged when their content is identical.
As an example of how you could use the axis model to improve performance of a spreadsheet, consider a spreadsheet with an very large number of rows. If you are resizing the rows based on the data, then you might want to create a custom axis model for SheetView.Models.RowAxis to return this value.
This only requires creating a class derived from DefaultSheetAxisModel that takes a reference to the SheetView in its constructor and stores it in a field. Then override the GetSize method to call GetPreferredRowHeight (in the SheetView) for the row index. You can also override the GetResizable method to prevent the user from trying to change the row heights manually, which will not work since GetSize is always returning the preferred height.
Have a question?
RSS Subscribe
Tour Home
Overview
Appearance
User Interaction
Cell Types
Formulas
Managing Data
Data Binding
Import/Export
Printing
Keyboard Interaction
Shapes
Models
Spread Designer
Map
Copyright © 1991-2007 FarPoint Technologies, Inc. All rights reserved. All names are property of their respective owners.