MainWeb

MainWeb class

Parent class of GridWeb control.Internal use only.

public class MainWeb : ExtWebControl, INamingContainer, IPostBackDataHandler, 
    IPostBackEventHandler, ISerializable

Constructors

Name Description
MainWeb() The default constructor.

Properties

Name Description
ActiveCell { get; set; } Gets or sets the active cell of the current sheet. Changed to be writable since version 1.9.0.1.
ActiveCellBgColor { get; set; } Specifies the background color of the active cell.
ActiveCellColor { get; set; } Specifies the color of the active cell.
ActiveHeaderBgColor { get; set; } Specifies the background color of the active row/column header.
ActiveHeaderColor { get; set; } Specifies the color of the active row/column header.
ActiveSheet { get; } Gets the active sheet
ActiveSheetIndex { get; set; } Gets or sets the active sheet index. Equal to the WebWorksheets.ActiveSheetIndex.
ActiveTabStyle { get; set; } Specifies the style of the active tab.
ACWClientPath { get; set; } Gets or sets the web path of the script/image files of the control. For example: “http://localhost/acw_client”. You may also set this value in the web.config file. Add this section to the <configuration> section: <appSettings><add key=“aspose.cells.gridweb.acw_client_path” value="/acw_client/" /></appSettings>
ACWLanguageFileUrl { get; set; } Gets or sets the web url of the language file of the control. For example: “/acw_client/lang_en.js”. By default, a built-in english file is used.
AutoRefreshChart { get; set; } Gets or sets whether the Chart image is updated while updating the cell value.the default is true
BottomTableStyle { get; set; } Gets or sets the style of the bottom bar of the control.
CurrentPageIndex { get; set; }
CustomCalculationEngine { get; set; } Represents user’s custom calculation engine to extend the default calculation engine of Aspose.Cells.
CustomCommandButtons { get; }
CustomStyleFileName { get; set; } Gets or sets the custom style file name.
DefaultFontName { get; set; } Gets or sets the control’s default font name.
DefaultFontSize { get; set; } Gets or sets the control’s default font size.
DefaultGridLineColor { get; set; } Gets or sets the default grid line’s color.
DisplayCellTip { get; set; }
EditMode { get; set; } Gets or sets the control’s edit mode.
EnableAJAX { get; set; }
EnableAsync { get; set; } Gets or sets whether load cells data in asynchronous way,suggest to apply for one sheet with more than 10000 cells.
EnableClientColumnOperations { get; set; } Gets or sets whether to enable the client side column operations.
EnableClientFreeze { get; set; } Gets or sets whether to enable the client side freezing operations.
EnableClientMergeOperations { get; set; } Gets or sets whether to enable the client side merge operations.
EnableClientResizeColumnRow { get; set; } Gets or sets whether to enable the client side resize column and row.
EnableClientRowOperations { get; set; } Gets or sets whether to enable the client side row operations.
EnableDoubleClickEvent { get; set; } Gets or sets whether to enable customer side double-click event.
EnableMetalLightEffect { get; set; } Gets or sets whether to apply metal light effect.
EnablePaging { get; set; } Gets or sets whether to enable the control’s paging mode.
EnableStyleDialogbox { get; set; } Gets or sets whether to enable the client side style dialogbox.
FilteredPaging { get; set; } Gets or sets whether to enable the paging after data filtered,will take affect when EnablePaging is true.
ForceValidation { get; set; } Gets or sets whether to force customer side validation.
FrameTableStyle { get; set; } Gets or sets the frame style of the control.
GoonDefaultSaveOperation { get; set; } Gets or sets whether GridWeb will do the default save operation ,the default value is true.
HeaderBarHeight { get; set; } Gets or sets the height( System.Web.UI.WebControl.Unit ) of the top header bar of the control.
HeaderBarStyle { get; set; } Gets or sets the header bar’s style.
HeaderBarTableStyle { get; set; } Gets or sets the header bar style of the control.
HeaderBarWidth { get; set; } Gets or sets the width( System.Web.UI.WebControl.Unit ) or the left header bar of the control.
override Height { get; set; } Gets or sets the height( System.Web.UI.WebControl.Unit ) of the control.
IgnoreStyleWithNoData { get; set; } Gets or sets whether GridWeb ignores showing rows or columns that do not contain cell values but are still styled. If set to true, the performance will be better. The default value is false, which means that if the last consecutive row/column has no cell values but is styled, we will still display them. This option is only valid when EnableAsync is false. This option has no effect when EnableAsync is true, which means GridWeb will show all rows/columns with style.
IsCalculateFormula { get; set; } Gets or sets whether to calculate formula after cell value changes or after import File. The default value is true.
IsPostBack { get; } Gets a value indicating whether gridweb is being loaded in response to a client postback, or if it is being loaded and accessed for the first time.
LinksTable { get; }
MaxColumn { get; set; } Gets or sets the maximum display column index(zero based) of the web sheet. The control uses the greater value of MaxColumn and sheet data’s max column.
MaxRow { get; set; } Gets or sets the maximum display row index(zero based) of the web sheet. The control uses the greater value of MaxRow and sheet data’s max row.
Message { get; set; }
MinColumn { get; set; }
MinRow { get; set; } Gets or sets the minimum display row index(zero based) of the web sheet. The control uses the smaller value of MinRow and sheet data’s min row.
ModifiedCells { get; } Gets the collection of the cells that modified by the client.
NeedRenderGroupRows { get; set; } Gets or sets whether to show grouprows .
NoHScroll { get; set; } Gets or sets a value indicating whether the horizontal scroll bar is hidden.
NoScroll { get; set; }
NoVScroll { get; set; } Gets or sets a value indicating whether the vertical scroll bar is hidden.
OnAjaxCallFinishedClientFunction { get; set; } Gets or sets the client side function name to be called when ajaxcall finished. The client function should be declared like this: function GridAjaxcallFinished() { alert(this.id+" ajaxcall finished “); }Note: You may use the “this” pointer in the client function to point the grid control which fires the event.
OnCellErrorClientFunction { get; set; } Gets or sets the client side function name to be called when a cell’s validation is failed. The client function should be declared like this: function MyOnCellError(cell) { alert(GridWeb1.getCellValueByCell(cell)); }Note: You may use the “this” pointer in the client function to point the grid control which fires the event.
OnCellSelectedAjaxCallBackClientFunction { get; set; } Gets or sets the client side function to be called when a cell is selected. The client function should be declared like this: function MyOnSelectCellAjaxCallBack(cell,customerdata) { }Note: You may use the “this” pointer in the client function to point the grid control which fires the event.
OnCellSelectedClientFunction { get; set; } Gets or sets the client side function to be called when a cell is selected. The client function should be declared like this: function MyOnSelectCell(cell) { GridWeb1.setCellValueByCell(cell, “test”); }Note: You may use the “this” pointer in the client function to point the grid control which fires the event.
OnCellUnselectedClientFunction { get; set; } Gets or sets the client side function to be called when a cell is unselected. The client function should be declared like this: function MyOnUnselectCell(cell) { GridWeb1.setCellValueByCell(cell, “test”); }Note: You may use the “this” pointer in the client function to point the grid control which fires the event.
OnCellUpdatedClientFunction { get; set; } Gets or sets the client side function name to be called when a cell’s value is updated. The client function should be declared like this: function MyOnCellUpdated(cell) { alert(this.getCellValueByCell(cell)); }Note: You may use the “this” pointer in the client function to point the grid control which fires the event.
OnContextMenuShowClientFunction { get; set; } Gets or sets the client side function to be called when the context menu will be shown. The client function should be declared like this: function onContextMenuShow() { var menu = event.srcElement; menu.setItemVisibility(“Delete”, “block”); menu.setItemVisibility(“Update”, “none”); }Note: You may use the “this” pointer in the client function to point the grid control which fires the event.
OnDoubleClickCellClientFunction { get; set; } Gets or sets the client side function to be called when a cell is double clicked. The client function should be declared like this: function MyOnDoubleClickCell(cell) { GridWeb1.setCellValueByCell(cell, “test”); }Note: You may use the “this” pointer in the client function to point the grid control which fires the event.
OnDoubleClickRowClientFunction { get; set; } Gets or sets the client side function to be called when a row is double clicked. The client function should be declared like this: function MyOnRowDoubleClick(row) { alert(row); }Note: You may use the “this” pointer in the client function to point the grid control which fires the event.
OnGridInitClientFunction { get; set; } Gets or sets the client side function name to be called when the grid is initialized. The client function should be declared like this: function MyOnGridInit(grid) { alert(“The grid is initialized: " + grid.id); }Note: You may use the “this” pointer in the client function to point the grid control which fires the event.
OnlyAuto { get; set; } Gets or sets whether only fit the rows which height are not customed,the default value is false
OnPageChangeClientFunction { get; set; } Gets or sets the client side function to be called after page index changing.only take effect when EnablePaging is true. The client function should be declared like this: function MyOnPageChange(index) { console.log(“current page is:"+index); }Note: You may use the “this” pointer in the client function to point the grid control which fires the event.
OnPageSubmitClientFunction { get; set; } Gets or sets the client function to be called before the page is submitted at client side.
OnShapeSelectedClientFunction { get; set; } Gets or sets the client side function to be called when a shape is selected. The client function should be declared like this: function MyOnSelectShape(shape) { var name=shape.getAttribute(“namevalue”) var text=shape.getAttribute(“textvalue”) var value=shape.getAttribute(“controlvalue”) var type=shape.getAttribute(“msotype”) }Note: You may use the “this” pointer in the client function to point the grid control which fires the event.
OnSubmitClientFunction { get; set; } Gets or sets the client function to be called before the control is submitted at client side. The client function should be declared like this: function MyOnSubmit(arg, cancelEdit) { return true;} The arg is the submit argument, contains the command to be post to the server. The cancelEdit is boolean value indicates whether the control has discarded the user input before submit. The control will continue submitting if the function returns true. Note: You may use the “this” pointer in the client function to point the grid control which fires the event.
PageSize { get; set; } Gets or sets the page size in paging mode.
PicturesTable { get; }
PresetStyle { get; set; } Gets or sets the preset style.
RefreshValidation { get; set; } Gets or sets whether to refresh validation value after cell value changes.
RenderHiddenRow { get; set; } Gets or sets whether the hidden row is rendered in GridControl,the default value is false. if you need to unhide the hidden row latter ,you shall set it as true
ScrollBarArrowColor { get; set; } Specifies the color of the scrollbar’s arrow button.
ScrollBarBaseColor { get; set; } Specifies the color of the scroll bar of the control.
SelectCellBgColor { get; set; } Specifies the background color of the selected cells in multi-select range.
SelectCellColor { get; set; } Specifies the color of the selected cells in multi-select range.
SessionLoaded { get; set; }
SessionMode { get; set; } Gets or sets the session mode of the grid. There are 4 type of session mode: 1. Session(default): Use system session to store sheet data. Generally the asp.net uses InProc session state. The grid also supports “StateServer” out process session state and SQLServer session state. 2. ViewState: Use page’s viewstate to store sheet data. 3. Custom: Use LoadCustomData and SheetDataUpdated events to store/recover sheet data. 4. File: store/recover sheet data in SessionStorePath.
SessionSaved { get; set; }
SessionStorePath { get; set; } Gets or sets the session cache store path when session mode is File or ViewState, etc: gridweb.SessionStorePath=“c:/mytempdir/session”; then it will store session data in c:/mytempdir/session
Settings { get; set; } Represents the workbook settings.
ShapesTable { get; }
ShowAddButton { get; set; } Gets or sets whether to show the add worksheet button.
ShowBottomBar { get; set; }
ShowCellEditBox { get; set; } whether Gridweb shows edit box toolbar as in MS-EXCEL.if enable ,a edit box for current cell will display in Gridweb. if we enable this feature, we need to import jquery js library in your aspx files to support this new feature. all the latest jquery version is ok. etc.
ShowCommandBarAtTop { get; set; } Specifies whether to show the command bar(includes command bar and tab bar) at the top of the control.
ShowContextMenu { get; set; }
ShowDefaultGridLine { get; set; } Gets or sets whether to show the default grid lines of the cells.
ShowHeaderBar { get; set; }
ShowLoading { get; set; } Specifies whether to show a loading dialogbox while postbacking to server.
ShowLoadingPosition { get; set; } Specifies the left,top postion(in px) to show the loading dialogbox while postbacking to server ,etc. 100,200 means the loading dialogbox’s left,top postion is at 100px,200px .
ShowSaveButton { get; set; } Gets or sets whether to show the save button.
ShowSubmitButton { get; set; } Gets or sets whether to show the submit button.
ShowTabBar { get; set; }
ShowTabNavigation { get; set; } Gets or sets whether the tab navigation button is show,the default value is true.
ShowUndoButton { get; set; } Gets or sets whether to show the undo button.
SpanWrap { get; set; } Specifies whether to wrap content in the cell span.the default value is true.
TabStyle { get; set; } Gets or sets the style of the tab bar.
UseClientPageHeight { get; set; } Gets or sets whether gridweb use client page height as control height ,suitable for when set Height=“100%",default value is false
ValidationsTable { get; }
ViewPanelScrollLeft { get; set; } Gets or sets the position of the scroll bar of the grid’s view panel.
ViewPanelScrollTop { get; set; } Gets or sets the position of the scroll bar of the grid’s view panel.
ViewTableStyle { get; set; } Gets or sets the data view panel’s style.
WebWorksheets { get; }
override Width { get; set; } Gets or sets the width( System.Web.UI.WebControl.Unit ) of the control.
WorkSheets { get; }
XhtmlMode { get; set; }
static PictureCachePath { get; set; } Gets or sets the image storage path for the workbook,all the shapes,images will be stored in this directory, the default path is acwcache under current application Base Directory users need to implement a schedule service to clean the files those are out of session time.

Methods

Name Description
CalculateFormula() Calculates the result of formulas.
override DataBind() Bind the control and all its child contorls to the its datasource.
override Dispose()
ImportExcelFile(Stream) Imports from an excel file stream, including disk file stream or memory stream.
ImportExcelFile(string) Imports from an excel file.
LoadCSVFile(Stream) Loads data from a CSV file stream.
LoadCSVFile(string) Loads data from a CSV file.
LoadHTMLFile(Stream) Loads data from a HTML file stream.
LoadHTMLFile(string) Loads data from a HTML file.
LoadSpreadSheetMLFile(Stream) Loads data from a SpreadSheetML file stream.
LoadSpreadSheetMLFile(string) Loads data from a SpreadSheetML file.
RefreshChartShape() refresh all the chart image for the active worksheet .
override RenderBeginTag(HtmlTextWriter)
SaveCSVFile(Stream) Saves data to a CSV file stream.
SaveCSVFile(string) Saves data to a CSV file.
SaveCustomStyleFile(string) Saves current style data of the control to an xml file. Can be used to create your customized style file.
SaveHTMLFile(Stream) Saves data to a HTML file stream.
SaveHTMLFile(string) Saves data to a HTML file.
SaveSpreadSheetMLFile(Stream) Saves data to a SpreadSheetML file stream.
SaveSpreadSheetMLFile(string) Saves data to a SpreadSheetML file.
SaveToExcelFile(Stream) Saves the worksheets to an excel file.
SaveToExcelFile(string) Saves the worksheets to an excel file with Excel 2003 format.
SaveToExcelFile(Stream, GridSaveFormat) Saves the worksheets to an excel file.
SaveToExcelFile(Stream, GridSaveOptions) Saves the worksheets to an excel file.
SaveToExcelFile(string, GridSaveFormat) Saves the worksheets to an excel file.
SaveToExcelFile(string, GridSaveOptions) Saves the worksheets to an excel file.
SetCustomStyle(Stream) sets the custom style file from stream including disk file stream or memory stream.

See Also