Class GridDesktop
Contents
[
Hide
]GridDesktop class
Aspose GridDesktop class Represents a root object to create an GridDesktop control. To use this control, simply drag it from your toolbox to a form or usercontrol.
public class GridDesktop : UserControl
Constructors
Name | Description |
---|---|
GridDesktop() | Aspose GridDesktop class |
Properties
Name | Description |
---|---|
ActiveSheetIndex { get; set; } | Gets or sets the selected sheet index. |
ActiveSheetNameFont { get; set; } | Gets or sets the active sheet displaying font of sheet bar. |
AlwasysRecalculateAllFormulas { get; set; } | Gets or sets a value indicating whether we need to run all formulas,as when we run all formulas, when update one cell value,and it affect others ,and others affect others ,more and more, cause the whole cells need recalculate ,just like the Butterfly Effect,it needs lots of stack opertation , it will get very low performance, like in CELLSNET-41921,this issue contains the very file that can show this scenario we’d better just run all formulas, ,as when run all formulas we may have some optimization. |
BorderStyle { get; set; } | Indicates the border style for the control. |
ColumnHeaderVisible { get; set; } | Gets or sets a value indicating whether column header is visible. |
CommentDisplayingFont { get; set; } | Gets or sets the default displaying font of comment text. |
ContextMenuManager { get; } | Gets the ContextMenuManager instance. |
DefaultCellFont { get; set; } | Gets or sets the default font of the cell |
DefaultCellFontColor { get; set; } | Gets or sets the default font color of the cell. |
EnableClipboardCopyPaste { get; set; } | Indicates whether to copy/paste based on clipboard,so that it can copy/paste with MS-EXCEL. It only copys/pastes cell value ,It does not copy any other setting of the cell like format,border style and so on The default value is false. |
EnableCopyWithExtension { get; set; } | Gets or sets a value indicating whether the copy operation will extend the number of rows or columns. |
EnableCopyWithLockedOption { get; set; } | Gets or sets a value indicating whether the copy operation will copy the style’s CellLocked attribute value of a cell. |
EnableUndo { get; set; } | Gets or sets a value indicating whether the Undo function is enabled. The default value is false. |
GridMemorySetting { get; set; } | Gets or sets memory option. |
IsHorizontalScrollBarVisible { get; set; } | Sets visible statue for Horizontal ScrollBar. |
IsVerticalScrollBarVisible { get; set; } | Sets visible statue for Vertical ScrollBar. |
Names { get; } | Gets the collection of all the Name objects in the spreadsheet. |
PageRows { get; set; } | Sets or Gets row size for Pagination.the maximum of PageRows supported is 100000,the maximum of page number supported is 5000. |
PasteType { get; set; } | Indicates which paste type when do paste action,only available when EnableClipboardCopyPaste is false .the default value is GridPasteType.Default; |
R1C1 { get; set; } | Gets or sets a value indicating whether the control using R1C1 reference style. |
RecalculateFormulas { get; set; } | Gets or sets a value indicating whether to recalculate all the cells’ formula when a cell’s value changed. The default value is true. |
RowHeaderVisible { get; set; } | Gets or sets a value indicating whether row header is visible. |
SheetNameFont { get; set; } | Gets or sets the default displaying font of sheet bar. |
SheetsBarVisible { get; set; } | Gets or sets a value indicating whether sheet bar is visible. |
SheetTabWidth { get; set; } | Sets /Gets width of Sheet Tab. |
ShowContextMenu { get; set; } | Gets or sets a value indicating whether the control can show context menu. |
ShowFormulaWarning { get; set; } | Sets/Gets whether to show the error or waring message for set cell formula value,the default value is true. |
ShowNumberStoredAsTextSymbol { get; set; } | Sets /Gets whether show the triangle symbol for the cell which contains number string but stored as text format |
ShowStatus { get; set; } | Gets or sets a value indicating whether to show the calculate status The default value is true. |
UndoManager { get; } | Gets the UndoManager instance. |
Worksheets { get; } | Gets the Worksheets. |
Methods
Name | Description |
---|---|
Clear() | Clears GridDesktop control. |
Copy() | Copies focused cell content to clipboard. |
Cut() | Cuts focused cell content to clipboard. |
DoSplit() | Sets Split view. |
EndFormatPainter() | Notifies GridDesktop to end FormatPainter. |
ExportExcelFile(Stream) | Exports to a excel file stream, including disk IO stream or memory stream. |
ExportExcelFile(string) | Exports to an excel file. |
ExportExcelFile(Stream, FileFormatType) | Exports to a excel file stream, including disk IO stream or memory stream. |
ExportExcelFile(string, FileFormatType) | Exports to a excel file. |
ExportPdfFile(Stream, GridPdfSaveOptions) | Exports to a pdf file stream, including disk IO stream or memory stream. |
ExportPdfFile(string, GridPdfSaveOptions) | Exports to a pdf file stream, including disk IO stream or memory stream. |
GetActiveWorksheet() | Gets current active worksheet. |
getHScrollBar() | return horizontal scroll bar |
getVScrollBar() | return vertical scroll bar |
ImportExcelFile(Stream) | Imports from an excel file stream, including disk file stream or memory stream. |
ImportExcelFile(string) | Imports from an excel file. |
ImportExcelFile(Stream, bool) | Imports from an excel file stream, including disk file stream or memory stream. |
ImportExcelFile(string, bool) | Imports from an excel file. |
ImportExcelFile(string, int) | Imports a worksheet from an excel file. |
ImportExcelFile(Stream, string, string, bool, bool) | Imports from an excel file. |
ImportExcelFile(string, string, string, bool, bool) | Imports from an excel file. |
Invalidate() | Override invalidate. |
OpenFindReplaceDialog(bool) | Opens the FindReplace dialog to find or replace cells. |
Paste() | Pastes clipboard content to focused cell. |
RefreshControl() | Refresh the GridDesktop control. |
RunAllFormulas() | Runs all the cells’s formula. |
SetAllScrollBarsVisible() | Sets all scrollbars visible. |
SetCustomResourceManager(ResourceManager) | Set custom resource manager to implement user defined localization |
ShowStyleDialog() | Opens a style dialog,to set cells style,font,colors etc. |
StartFormatPainter(bool) | Notifies GridDesktop to start FormatPainter. |
UnDoSplit() | Unset Split view. |
static GetVersion() | Get the release version. |
Fields
Name | Description |
---|---|
LoadDataFilter | the options to filter data when loading workbook from template. |
ShowImportMessage | wether to show message box when fail to import the file ,the default value is true |
Events
Name | Description |
---|---|
event AfterDeleteColumns | Occurs after column is deleted. |
event AfterDeleteRows | Occurs after row is deleted. |
event AfterInsertColumns | Occurs after new column is inserted. |
event AfterInsertRows | Occurs after new row is inserted. |
event BeforeCalculate | Occurs before calculate formula in workbook. |
event BeforeLoadFile | Occurs before workbook loaded from file. |
event CellButtonClick | Occurs when the cell button clicked. |
event CellCheckedChanged | Occurs when the cell checkbox Checked property is changed. |
event CellClick | Occurs when the gridcell is clicked. |
event CellComboBoxCopy | Occurs when a grid cell ComboBox is being copied. |
event CellDataChanged | Occurs when the grid cell data property is changed. |
event CellDoubleClick | Occurs when the gridcell is double clicked. |
event CellFormatChanged | Occurs when the cell format is changed via Format Cells dialog box. |
event CellKeyPressed | Occurs when a key is pressed while a cell has focus. |
event CellSelectedIndexChanged | Occurs when the cell combobox SelectedIndex property has changed. |
event CellTextBoxChanging | Occurs when typing characters in a grid cell. |
event CellValidationFailed | Occurs when a grid cell validates failed. |
event ColumnHeaderClick | Occurs when the column header clicked. |
event ColumnHeaderDoubleClick | Occurs when the column header double clicked. |
event CommentDataChanged | Occurs when the comment data has changed. |
event FailLoadFile | |
event FinishCalculate | Occurs after calculate formula in workbook. |
event FinishLoadFile | Occurs when the workbook is loaded. |
event FocusedCellChanged | Occurs when the focused cell is changed. |
event PictureClick | Occurs when the shape is clicked. |
event RowColumnHiddenChanged | Occurs when the row/column hide status changed. |
event RowFilteredEvent | Occurs after row filter item selected. |
event RowHeaderClick | Occurs when the row header clicked. |
event RowHeaderDoubleClick | Occurs when the row header double clicked. |
event SelectedCellRangeChanged | Occurs when the selected cellrange is changed. |
event SelectedSheetIndexChanged | Occurs when the SelectedSheetIndex property is changed. |
event ShapeClick | Occurs when the shape is clicked. |
Remarks
Please refer to .NET SDK document about further information about System.Windows.Forms.UserControl.
Examples
[C#]
gridDesktop1.Worksheets[0].Cells[0, 0].Value = "2";
gridDesktop1.Worksheets[0].Cells[1, 0].Value = "3";
gridDesktop1.Worksheets[0].Cells[2, 1].Value = "=a1*a2";
gridDesktop1.RunAllFormulas();
gridDesktop1.Invalidate();
[Visual Basic]
gridDesktop1.Worksheets(0).Cells(0, 0).Value = "2"
gridDesktop1.Worksheets(0).Cells(1, 0).Value = "3"
gridDesktop1.Worksheets(0).Cells(2, 1).Value = "=a1*a2"
gridDesktop1.RunAllFormulas()
gridDesktop1.Invalidate()
See Also
- namespace Aspose.Cells.GridDesktop
- assembly Aspose.Cells.GridDesktop