WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SpreadsheetGrid - WindowsForms API Reference | Syncfusion IWorksheet. ">

    Show / Hide Table of Contents

    Class SpreadsheetGrid

    Represents a class which is used for displaying the data of IWorksheet.

    Inheritance
    System.Object
    BaseControl
    ScrollControl
    SfCellGrid
    SpreadsheetGrid
    Implements
    IThemeProvider
    IVisualStyle
    ICancelModeProvider
    ISplitterPaneSupport
    IScrollBarWrapperContainer
    ISupportUpdating
    ISupportIntelliMouse
    IQueryFocusInside
    INonClientPaintingSupport
    ICalcData
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    Inherited Members
    SfCellGrid.currentCell
    SfCellGrid.OnContainerKeyDown(KeyEventArgs)
    SfCellGrid.InvalidateCells(Boolean)
    SfCellGrid.InvalidateCell(Int32, Int32)
    SfCellGrid.InvalidateCell(GridRangeInfo, Boolean)
    SfCellGrid.InvalidateCellBorders(GridRangeInfo)
    SfCellGrid.InvalidateVisual()
    SfCellGrid.InvalidateVisual(Boolean)
    SfCellGrid.InvalidateVisual(Boolean, GridRangeInfo)
    SfCellGrid.InvalidateSelection()
    SfCellGrid.InvalidateSelection(GridRangeInfo)
    SfCellGrid.ScrollInView(RowColumnIndex)
    SfCellGrid.PointToCellRowColumnIndex(Point)
    SfCellGrid.PointToCellRowColumnIndexOutsideCells(Point, Boolean)
    SfCellGrid.OnPreviewKeyDown(PreviewKeyDownEventArgs)
    SfCellGrid.GetValueRowCol(Int32, Int32)
    SfCellGrid.SetValueRowCol(Object, Int32, Int32)
    SfCellGrid.WireParentObject()
    SfCellGrid.OnValueChanged(Int32, Int32, String)
    SfCellGrid.RecalculateCell(Int32, Int32, Boolean)
    SfCellGrid.OnHScroll(Object, ScrollEventArgs)
    SfCellGrid.OnVScroll(Object, ScrollEventArgs)
    SfCellGrid.OnHorizontalScroll(Object, ScrollEventArgs)
    SfCellGrid.OnVerticalScroll(Object, ScrollEventArgs)
    SfCellGrid.UpdateScrollBars()
    SfCellGrid.OnSizeChanged(EventArgs)
    SfCellGrid.IDisposable.Dispose()
    SfCellGrid.CreateGridColumn
    SfCellGrid.SelectionController
    SfCellGrid.AutoScroller
    SfCellGrid.SelectedRanges
    SfCellGrid.EditTrigger
    SfCellGrid.EditorSelectionBehavior
    SfCellGrid.FormulaEngine
    SfCellGrid.CopyPaste
    SfCellGrid.RowCount
    SfCellGrid.ColumnCount
    SfCellGrid.FrozenRows
    SfCellGrid.FrozenColumns
    SfCellGrid.FooterRows
    SfCellGrid.FooterColumns
    SfCellGrid.HeaderRows
    SfCellGrid.HeaderColumns
    SfCellGrid.DefaultColumnWidth
    SfCellGrid.DefaultRowHeight
    SfCellGrid.RowHeights
    SfCellGrid.ColumnWidths
    SfCellGrid.ShowGridLines
    SfCellGrid.GridLineColor
    SfCellGrid.SelectionBorderThickness
    SfCellGrid.SelectionBorderBrush
    SfCellGrid.SelectionBrush
    SfCellGrid.AllowGesture
    SfCellGrid.CoveredCells
    SfCellGrid.AllowEditing
    SfCellGrid.AllowSelection
    SfCellGrid.ColumnResizingController
    SfCellGrid.RowResizingController
    SfCellGrid.AllowRowResize
    SfCellGrid.AllowColumnResize
    SfCellGrid.AllowHiddenRowResize
    SfCellGrid.AllowHiddenColumnResize
    SfCellGrid.ShowComment
    SfCellGrid.ShowTooltip
    SfCellGrid.AllowFloatingCell
    SfCellGrid.AllowFloatingCellInEdit
    SfCellGrid.AllowExcelLikeKeyNavigation
    SfCellGrid.ScrollRows
    SfCellGrid.ScrollColumns
    SfCellGrid.CellContextMenu
    SfCellGrid.AllowEditorsContextMenu
    SfCellGrid.ValueChanged
    SfCellGrid.SelectionChanging
    SfCellGrid.SelectionChanged
    SfCellGrid.CurrentCellActivating
    SfCellGrid.CurrentCellActivated
    SfCellGrid.CurrentCellBeginEdit
    SfCellGrid.CurrentCellEndEdit
    SfCellGrid.CurrentCellValueChanged
    SfCellGrid.CurrentCellValidating
    SfCellGrid.CurrentCellValidated
    SfCellGrid.CellRequestNavigate
    SfCellGrid.CellClick
    SfCellGrid.ResizingColumns
    SfCellGrid.ResizingRows
    SfCellGrid.CellCommentOpening
    SfCellGrid.CellTooltipOpening
    SfCellGrid.CellContextMenuOpening
    SfCellGrid.PropertyChanged
    ScrollControl.IgnoreSizeGripStyleHideShow
    ScrollControl.Dispose()
    ScrollControl.ResetMouseController()
    ScrollControl.ShouldSerializeMouseWheelScrollLines()
    ScrollControl.LastMousePositionToClient()
    ScrollControl.HitTest(Point)
    ScrollControl.HitTest(Point, MouseButtons)
    ScrollControl.HitTest(Point, MouseButtons, IMouseController)
    ScrollControl.HitTest(Point, MouseButtons, Int32, IMouseController)
    ScrollControl.OnOffice2007ScrollBarsChanged(EventArgs)
    ScrollControl.OnOffice2007ScrollBarsColorSchemeChanged(EventArgs)
    ScrollControl.OnOffice2010ScrollBarsColorSchemeChanged(EventArgs)
    ScrollControl.OnOffice2016ScrollBarsColorSchemeChanged(EventArgs)
    ScrollControl.OnOfficeScrollBarsChanged(ScrollControl.OfficeScrollBarsEventArgs)
    ScrollControl.OnThemeNameChanged(String)
    ScrollControl.OnParentChanged(EventArgs)
    ScrollControl.OnMouseWheel(MouseEventArgs)
    ScrollControl.OnSplitterPaneClosed(EventArgs)
    ScrollControl.OnSplitterPaneClosing(EventArgs)
    ScrollControl.OnFillSplitterPaneChanged(EventArgs)
    ScrollControl.OnScrollbarsVisibleChanged(EventArgs)
    ScrollControl.OnScrollControlMouseDown(CancelMouseEventArgs)
    ScrollControl.OnScrollControlMouseMove(CancelMouseEventArgs)
    ScrollControl.OnScrollControlMouseUp(CancelMouseEventArgs)
    ScrollControl.OnScrollControlHandledMouseUp(MouseEventArgs)
    ScrollControl.OnScrollControlHandledMouseMove(MouseEventArgs)
    ScrollControl.OnScrollControlHandledMouseDown(MouseEventArgs)
    ScrollControl.OnTouchPanBegin(Point)
    ScrollControl.OnTouchPan(Point, Boolean)
    ScrollControl.OnTouchPanEnd(Point)
    ScrollControl.OnMouseDown(MouseEventArgs)
    ScrollControl.OnMouseMove(MouseEventArgs)
    ScrollControl.OnStartAutoScrolling(StartAutoScrollingEventArgs)
    ScrollControl.OnSetCursor(Message)
    ScrollControl.OnMouseLeave(EventArgs)
    ScrollControl.OnMouseHover(EventArgs)
    ScrollControl.OnHScrollBarValueChanged(Object, EventArgs)
    ScrollControl.OnVScrollBarValueChanged(Object, EventArgs)
    ScrollControl.OnHorizontalScroll(ScrollEventArgs)
    ScrollControl.OnVerticalScroll(ScrollEventArgs)
    ScrollControl.OnShowContextMenu(ShowContextMenuEventArgs)
    ScrollControl.OnCancelMode(EventArgs)
    ScrollControl.OnIntelliMouseDragScrolling(IntelliMouseDragScrollEventArgs)
    ScrollControl.OnNcCalcSize(Rectangle)
    ScrollControl.OnScrollTipFeedback(ScrollTipFeedbackEventArgs)
    ScrollControl.OnCreateScrollTipWindow()
    ScrollControl.UpdateScrollTips(ScrollEventArgs)
    ScrollControl.OnAutoScrollingChanged(EventArgs)
    ScrollControl.OnUpdatingChanged(EventArgs)
    ScrollControl.OnInvalidated(InvalidateEventArgs)
    ScrollControl.OnWindowScrolled(ScrollWindowEventArgs)
    ScrollControl.OnWindowScrolling(ScrollWindowEventArgs)
    ScrollControl.OnEnter(EventArgs)
    ScrollControl.OnLeave(EventArgs)
    ScrollControl.OnValidating(CancelEventArgs)
    ScrollControl.OnValidated(EventArgs)
    ScrollControl.OnLostFocus(EventArgs)
    ScrollControl.OnGotFocus(EventArgs)
    ScrollControl.OnDeactivated(EventArgs)
    ScrollControl.OnControlRemoved(ControlEventArgs)
    ScrollControl.OnControlAdded(ControlEventArgs)
    ScrollControl.OnLocationChanged(EventArgs)
    ScrollControl.OnPaint(PaintEventArgs)
    ScrollControl.OnVisibleChanged(EventArgs)
    ScrollControl.OnControlGotFocus()
    ScrollControl.OnControlLostFocus()
    ScrollControl.OnValidatingLostFocus()
    ScrollControl.OnEnsurePaintCodeJitted()
    ScrollControl.OnAccelerateScrollingChanged(EventArgs)
    ScrollControl.OnDragOver(DragEventArgs)
    ScrollControl.ISplitterPaneSupport.PaneClosing()
    ScrollControl.ISplitterPaneSupport.PaneClosed()
    ScrollControl.GetScrollBarFrameOfComponent(Object)
    ScrollControl.GetDynamicSplitterFrameOfComponent(Object)
    ScrollControl.ProcessMouseWheel(MouseEventArgs)
    ScrollControl.ResetMouseWheelScrollLines()
    ScrollControl.InvalidateNc()
    ScrollControl.InvalidateNc(Rectangle)
    ScrollControl.UpdateNc()
    ScrollControl.OnNCPaint(NCPaintEventArgs)
    ScrollControl.INonClientPaintingSupport.NonClientPaint(PaintEventArgs, Rectangle, Rectangle)
    ScrollControl.NotifyCancelMode()
    ScrollControl.ResetInsideScrollMargins()
    ScrollControl.StartAutoScrollTimer(ScrollBarWrapper, ScrollEventType)
    ScrollControl.StartAutoScrollTimer(Message)
    ScrollControl.StartAutoScrollTimer(Message, Int32)
    ScrollControl.FixRenderOrigin(Graphics)
    ScrollControl.ShouldPrepareUpdate()
    ScrollControl.ShouldPrepareUpdate(Boolean)
    ScrollControl.BeginUpdate()
    ScrollControl.BeginUpdate(BeginUpdateOptions)
    ScrollControl.OnBeginUpdateScrollBars()
    ScrollControl.OnEndUpdateScrollBars()
    ScrollControl.EndUpdate()
    ScrollControl.CancelUpdate()
    ScrollControl.EndUpdate(Boolean)
    ScrollControl.ScrollWindow(Int32, Int32, Rectangle, Rectangle, Boolean)
    ScrollControl.QueryFocusInside()
    ScrollControl.OnRightToLeftChanged(EventArgs)
    ScrollControl.EnsurePaintCodeJitted(Boolean)
    ScrollControl.EnableDoubleBufferSurface()
    ScrollControl.UpdateStyles()
    ScrollControl.PreJitPaint
    ScrollControl.Cursor
    ScrollControl.AutoScrolling
    ScrollControl.DisableScrollWindow
    ScrollControl.SupportsThumbTrack
    ScrollControl.VerticalThumbTrack
    ScrollControl.HorizontalThumbTrack
    ScrollControl.VerticalScrollTips
    ScrollControl.HorizontalScrollTips
    ScrollControl.SizeGripStyle
    ScrollControl.AllowSizeGrip
    ScrollControl.ForceSizeBox
    ScrollControl.SmartSizeBox
    ScrollControl.AutoScrollTimerEnable
    ScrollControl.VScrollBar
    ScrollControl.HScrollBar
    ScrollControl.AllowIncreaseSmallChange
    ScrollControl.AutoScrollBounds
    ScrollControl.InsideScrollBounds
    ScrollControl.InsideScrollMargins
    ScrollControl.ScrollTip
    ScrollControl.ScrollTipFormat
    ScrollControl.IsMousePressed
    ScrollControl.IsValidating
    ScrollControl.IsValidated
    ScrollControl.IsActiveControl
    ScrollControl.IsDeactivated
    ScrollControl.HasControlFocus
    ScrollControl.IgnoreUICues
    ScrollControl.PaneDesc
    ScrollControl.MouseWheelScrollLines
    ScrollControl.SmoothMouseWheelScrolling
    ScrollControl.VScrollIncrement
    ScrollControl.HScrollIncrement
    ScrollControl.UseSharedScrollBars
    ScrollControl.BorderStyle
    ScrollControl.HScroll
    ScrollControl.VScroll
    ScrollControl.IsSplitterPaneClosed
    ScrollControl.MouseControllerDispatcher
    ScrollControl.ActiveController
    ScrollControl.ISplitterPaneSupport.FillSplitterPane
    ScrollControl.FillSplitterPane
    ScrollControl.IsSplitterPaneClosing
    ScrollControl.EnableIntelliMouse
    ScrollControl.DiscardPaintMessagesAfterBeginUpdate
    ScrollControl.IsDisposing
    ScrollControl.LastMousePosition
    ScrollControl.AccelerateScrolling
    ScrollControl.AllowRaiseMouseMoveInOnDragOver
    ScrollControl.Size
    ScrollControl.Bounds
    ScrollControl.TabIndex
    ScrollControl.UpdateOptions
    ScrollControl.ISupportUpdating.Updating
    ScrollControl.Updating
    ScrollControl.PaintPending
    ScrollControl.HasDoubleBufferSurface
    ScrollControl.DoubleBufferSurface
    ScrollControl.UpdatingStyles
    ScrollControl.ThemeStyle
    ScrollControl.EnableTouchMode
    ScrollControl.MetroColorTable
    ScrollControl.Office2016BlackColorTable
    ScrollControl.Office2016WhiteColorTable
    ScrollControl.Office2016DarkGrayColorTable
    ScrollControl.Office2016ColorfulColorTable
    ScrollControl.MetroScrollBars
    ScrollControl.Office2016ScrollBars
    ScrollControl.Office2007ScrollBars
    ScrollControl.IVisualStyle.VisualTheme
    ScrollControl.Office2007ScrollBarsColorScheme
    ScrollControl.ClientRectangle
    ScrollControl.ClientSize
    ScrollControl.GridOfficeScrollBars
    ScrollControl.Office2010ScrollBarsColorScheme
    ScrollControl.Office2016ScrollBarsColorScheme
    ScrollControl.DpiAware
    ScrollControl.Deactivated
    ScrollControl.AccelerateScrollingChanged
    ScrollControl.VerticalScroll
    ScrollControl.HorizontalScroll
    ScrollControl.IntelliMouseDragScrolling
    ScrollControl.ShowContextMenu
    ScrollControl.StartAutoScrolling
    ScrollControl.SplitterPaneClosed
    ScrollControl.SplitterPaneClosing
    ScrollControl.ScrollTipFeedback
    ScrollControl.ScrollbarsVisibleChanged
    ScrollControl.MouseWheelZoom
    ScrollControl.FillSplitterPaneChanged
    ScrollControl.UpdatingChanged
    ScrollControl.WindowScrolled
    ScrollControl.WindowScrolling
    ScrollControl.ScrollControlMouseDown
    ScrollControl.ScrollControlHandledMouseDown
    ScrollControl.ScrollControlMouseMove
    ScrollControl.ScrollControlHandledMouseMove
    ScrollControl.ScrollControlMouseUp
    ScrollControl.ScrollControlHandledMouseUp
    ScrollControl.CancelMode
    ScrollControl.AutoScrollingChanged
    ScrollControl.Office2010ScrollBarsColorSchemeChanged
    ScrollControl.Office2016ScrollBarsColorSchemeChanged
    ScrollControl.OfficeScrollBarsChanged
    ScrollControl.Office2007ScrollBarsColorSchemeChanged
    ScrollControl.Office2007ScrollBarsChanged
    BaseControl.RaiseThemeChanged(Object, ThemeChangedEventArgs)
    BaseControl.GetActiveThemeName()
    BaseControl.GetControlName(String)
    BaseControl.OnCanApplyThemeChanged(Boolean)
    BaseControl.OnCanOverrideStyleChanged(Boolean)
    BaseControl.ThemeName
    BaseControl.CanOverrideStyle
    BaseControl.IThemeProvider.BaseThemeName
    BaseControl.CanApplyTheme
    BaseControl.ControlName
    BaseControl.IsVisualStyleEnabled
    BaseControl.ThemeNameChanged
    Namespace: Syncfusion.Windows.Forms.Spreadsheet
    Assembly: Syncfusion.Spreadsheet.Windows.dll
    Syntax
    public class SpreadsheetGrid : SfCellGrid, IThemeProvider, IVisualStyle, ICancelModeProvider, ISplitterPaneSupport, IScrollBarWrapperContainer, ISupportUpdating, ISupportIntelliMouse, IQueryFocusInside, INonClientPaintingSupport, ICalcData, INotifyPropertyChanged, IDisposable
    Remarks

    The data will be displayed in the form of rows and columns. This class also includes the selection and editing operations in grid that allow the users to easily manage the data.

    Constructors

    SpreadsheetGrid()

    Initializes a new instance of the SpreadsheetGrid class.

    Declaration
    public SpreadsheetGrid()

    Properties

    CellRenderers

    Gets a value indicating the instance of SpreadsheetCellRendererCollection which holds the collection of cellrenderer objects.

    Declaration
    public SpreadsheetCellRendererCollection CellRenderers { get; }
    Property Value
    Type Description
    SpreadsheetCellRendererCollection

    An instance of SpreadsheetCellRendererCollection.

    ColumnGroupPanel

    Gets or sets the Panel used for Column Grouping

    Declaration
    public OutlinesPanel ColumnGroupPanel { get; set; }
    Property Value
    Type Description
    OutlinesPanel

    CreateParams

    Used this to avoid the flickering in formula bar when open and close the backstage.

    Declaration
    protected override CreateParams CreateParams { get; }
    Property Value
    Type Description
    System.Windows.Forms.CreateParams
    Overrides
    ScrollControl.CreateParams

    CurrentCell

    Gets the value indicating the instance of the SpreadsheetCurrentCell which maintains the current cell in SpreadsheetGrid.

    Declaration
    public SpreadsheetCurrentCell CurrentCell { get; }
    Property Value
    Type Description
    SpreadsheetCurrentCell

    An instance of SpreadsheetCurrentCell.

    FillSeriesController

    Gets or sets the value indicating the instance of FillSeriesController which provides support to autofill the data.

    Declaration
    public FillSeriesController FillSeriesController { get; set; }
    Property Value
    Type Description
    FillSeriesController

    An instance of FillSeriesController.

    GraphicModel

    Gets the value indicating the instance of GraphicModel which holds all the information about graphic cells.

    Declaration
    public GraphicModel GraphicModel { get; }
    Property Value
    Type Description
    GraphicModel

    An instance of GraphicModel.

    Model

    Gets the value indicating the instance of SpreadsheetGridModel which holds the operation on rows and columns in SpreadsheetGrid.

    Declaration
    public SpreadsheetGridModel Model { get; }
    Property Value
    Type Description
    SpreadsheetGridModel

    An instance of SpreadsheetGridModel

    RowGroupPanel

    Gets or sets the Panel used for Row Grouping

    Declaration
    public OutlinesPanel RowGroupPanel { get; set; }
    Property Value
    Type Description
    OutlinesPanel

    SheetName

    Gets the value indicating the name of the worksheet in the Workbook.

    Declaration
    public string SheetName { get; }
    Property Value
    Type Description
    System.String

    Name of the worksheet.

    Worksheet

    Gets the value indicating the instance of IWorksheet in the Workbook.

    Declaration
    public IWorksheet Worksheet { get; }
    Property Value
    Type Description
    IWorksheet

    An instance of IWorksheet.

    Methods

    Dispose(Boolean)

    Releases all resources used by the. SpreadsheetGrid.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    SfCellGrid.Dispose(Boolean)

    GetCalculatedValue(IRange)

    Returns the calculated value (without formatting) for a formula cell.

    Declaration
    public string GetCalculatedValue(IRange range)
    Parameters
    Type Name Description
    IRange range

    IRange.

    Returns
    Type Description
    System.String
    Remarks

    If the passed range is not a formula cell, then it returns null.

    GetCellValue(Int32, Int32)

    Used to get the value of the cell.

    Declaration
    public override object GetCellValue(int rowIndex, int colIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    RowIndex of the cell.

    System.Int32 colIndex

    ColumnIndex of the cell.

    Returns
    Type Description
    System.Object

    Returns the cell value.

    Overrides
    SfCellGrid.GetCellValue(Int32, Int32)

    GetDependentCellValue(Int32, Int32)

    This method gets the dependent cell value of the corresponding row and column index of the SpreadsheetGrid.

    Declaration
    public override string GetDependentCellValue(int rowIndex, int colIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Index of the corresponding cell's row.

    System.Int32 colIndex

    Index of the corresponding cell's column.

    Returns
    Type Description
    System.String

    An instance of IRange.

    Overrides
    SfCellGrid.GetDependentCellValue(Int32, Int32)

    GetDisplayText(Int32, Int32)

    Used to get the display text of the cell.

    Declaration
    public override string GetDisplayText(int rowIndex, int colIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    RowIndex of the cell.

    System.Int32 colIndex

    ColumnIndex of the cell.

    Returns
    Type Description
    System.String

    Returns the display text.

    Overrides
    SfCellGrid.GetDisplayText(Int32, Int32)

    InitializeCellRendererCollection()

    Initializes the CellRenderer Collection in the SpreadsheetGrid.

    Declaration
    protected override void InitializeCellRendererCollection()
    Overrides
    SfCellGrid.InitializeCellRendererCollection()

    OnCellRequestNavigateEvent(CellRequestNavigateEventArgs)

    Provides support for hyperlink navigation between different cells in SpreadsheetGrid.

    Declaration
    protected override bool OnCellRequestNavigateEvent(CellRequestNavigateEventArgs e)
    Parameters
    Type Name Description
    CellRequestNavigateEventArgs e

    An instance of CellRequestNavigateEventArgs

    Returns
    Type Description
    System.Boolean

    True, if the navigation can be done in cell; otherwise, false.

    Overrides
    SfCellGrid.OnCellRequestNavigateEvent(CellRequestNavigateEventArgs)

    OnCreateCopyPaste()

    Initialize the SpreadsheetCopyPaste when the SpreadsheetGrid is loaded.

    Declaration
    protected override GridCopyPaste OnCreateCopyPaste()
    Returns
    Type Description
    GridCopyPaste

    An instance of SpreadsheetCopyPaste.

    Overrides
    SfCellGrid.OnCreateCopyPaste()

    OnCreateCurrentCell()

    Creates a new instance of the GridCurrentCell which maintains the current cell in the grid.

    Declaration
    protected override GridCurrentCell OnCreateCurrentCell()
    Returns
    Type Description
    GridCurrentCell

    An instance of SpreadsheetColumn.

    Overrides
    SfCellGrid.OnCreateCurrentCell()

    OnCreateGridColumn(SfCellGrid)

    Creates a new instance of the GridColumn which holds the information of the every cells in the grid.

    Declaration
    protected override GridColumn OnCreateGridColumn(SfCellGrid grid)
    Parameters
    Type Name Description
    SfCellGrid grid

    An instance of SfCellGrid.

    Returns
    Type Description
    GridColumn

    An instance of SpreadsheetColumn.

    Overrides
    SfCellGrid.OnCreateGridColumn(SfCellGrid)

    OnCreateVisualContainer()

    To initialize the Visual Container

    Declaration
    protected override VisualContainer OnCreateVisualContainer()
    Returns
    Type Description
    VisualContainer
    Overrides
    SfCellGrid.OnCreateVisualContainer()

    OnCurrentCellEndEdit(CurrentCellEndEditEventArgs)

    Commits and ends the edit operation on the current cell in Spreadsheet.

    Declaration
    protected override void OnCurrentCellEndEdit(CurrentCellEndEditEventArgs e)
    Parameters
    Type Name Description
    CurrentCellEndEditEventArgs e

    An CurrentCellEndEditEventArgs that contains the event data.

    Overrides
    SfCellGrid.OnCurrentCellEndEdit(CurrentCellEndEditEventArgs)

    OnHandleCreated(EventArgs)

    Declaration
    protected override void OnHandleCreated(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e
    Overrides
    ScrollControl.OnHandleCreated(EventArgs)

    OnKeyDown(KeyEventArgs)

    Occurs before the KeyDown event when a key is pressed while focus is on this control.

    Declaration
    protected override void OnKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs e

    An System.Windows.Input.KeyEventArgs that contains the event data.

    Overrides
    SfCellGrid.OnKeyDown(KeyEventArgs)

    OnKeyUp(KeyEventArgs)

    Invoked when an unhandled System.Windows.Input.Keyboard.KeyUp attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnKeyUp(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs e

    The System.Windows.Input.KeyEventArgs that contains the event data.

    OnLayout(LayoutEventArgs)

    Need to fix the issue while programatically import the graphic cells and while navigating the different tabs.

    Declaration
    protected override void OnLayout(LayoutEventArgs levent)
    Parameters
    Type Name Description
    System.Windows.Forms.LayoutEventArgs levent
    Overrides
    SfCellGrid.OnLayout(LayoutEventArgs)

    OnMouseUp(MouseEventArgs)

    Declaration
    protected override void OnMouseUp(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e
    Overrides
    SfCellGrid.OnMouseUp(MouseEventArgs)

    OnMouseWheelZoom(MouseWheelZoomEventArgs)

    Zoom the grid on mouse wheel.

    Declaration
    protected override void OnMouseWheelZoom(MouseWheelZoomEventArgs e)
    Parameters
    Type Name Description
    MouseWheelZoomEventArgs e
    Overrides
    ScrollControl.OnMouseWheelZoom(MouseWheelZoomEventArgs)

    ProcessCmdKey(ref Message, Keys)

    Used to Process key down operations

    Declaration
    protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
    Parameters
    Type Name Description
    System.Windows.Forms.Message msg
    System.Windows.Forms.Keys keyData
    Returns
    Type Description
    System.Boolean

    ProcessKeyEventArgs(ref Message)

    Declaration
    protected override bool ProcessKeyEventArgs(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m
    Returns
    Type Description
    System.Boolean

    SetCellValue(IRange, String)

    Sets the value or formula to the given IRange in the Workbook

    Declaration
    public void SetCellValue(IRange currentExcelRange, string cellValue)
    Parameters
    Type Name Description
    IRange currentExcelRange

    An instance of IRange

    System.String cellValue

    Value to be displayed

    SetColumnWidth(Int32, Int32, Double)

    Used to set the column width in the SpreadsheetGrid.

    Declaration
    public override void SetColumnWidth(int startIndex, int endIndex, double width)
    Parameters
    Type Name Description
    System.Int32 startIndex

    Start column index.

    System.Int32 endIndex

    End column index.

    System.Double width

    Width of the column to expand.

    Overrides
    SfCellGrid.SetColumnWidth(Int32, Int32, Double)

    SetRowHeight(Int32, Int32, Double)

    Used to set the row height in the SpreadsheetGrid.

    Declaration
    public override void SetRowHeight(int startIndex, int endIndex, double height)
    Parameters
    Type Name Description
    System.Int32 startIndex

    Start row's index.

    System.Int32 endIndex

    End row's index.

    System.Double height

    Height of the row to resize.

    Overrides
    SfCellGrid.SetRowHeight(Int32, Int32, Double)

    ShowHidePopup(Boolean)

    To show and hide popup's when moved to another application

    Declaration
    public override void ShowHidePopup(bool show)
    Parameters
    Type Name Description
    System.Boolean show

    True, if the popup is displayed; otherwise false

    Overrides
    SfCellGrid.ShowHidePopup(Boolean)

    UnWireEvents()

    Unwires or unloads the events in SpreadsheetGrid.

    Declaration
    protected override void UnWireEvents()
    Overrides
    SfCellGrid.UnWireEvents()

    WireEvents()

    Wires or loads the events in SpreadsheetGrid.

    Declaration
    protected override void WireEvents()
    Overrides
    SfCellGrid.WireEvents()

    WndProc(ref Message)

    Declaration
    protected override void WndProc(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m
    Overrides
    ScrollControl.WndProc(ref Message)

    Events

    QueryRange

    Occurs when grid queries for IRange information about a specifc cell while rendering.

    Declaration
    public event SpreadsheetQueryRangeEventHandler QueryRange
    Event Type
    Type Description
    SpreadsheetQueryRangeEventHandler
    Examples
    var grid = spreadsheet.ActiveGrid;
    grid.QueryRange+=grid_QueryRange;
    void grid_QueryRange(object sender, SpreadsheetQueryRangeEventArgs e)
    {
       if (e.Cell.ColumnIndex == 5)
           e.ExcelStyle.ColorIndex = ExcelKnownColors.Blue;
    }

    Implements

    IThemeProvider
    IVisualStyle
    ICancelModeProvider
    ISplitterPaneSupport
    IScrollBarWrapperContainer
    ISupportUpdating
    ISupportIntelliMouse
    IQueryFocusInside
    INonClientPaintingSupport
    ICalcData
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable

    Extension Methods

    SelectionHelper.GetGridRow(SfCellGrid, Int32)
    SelectionHelper.GetVisibleRowColumnIndex(SfCellGrid, Int32, Int32)
    SelectionHelper.GetPreviousVisibleRowColumnIndex(SfCellGrid, Int32, Int32)
    SelectionHelper.GetPreviousVisibleRowIndex(SfCellGrid, Int32)
    SelectionHelper.GetPreviousVisibleColumnIndex(SfCellGrid, Int32)
    SelectionHelper.GetFirstVisibleRowIndex(SfCellGrid)
    SelectionHelper.GetFirstVisibleColumnIndex(SfCellGrid)
    SpreadsheetImportExtension.ImportWorksheetToGrid(SpreadsheetGrid, IWorksheet)
    GridExcelHelper.InvalidateCellRange(SpreadsheetGrid)
    GridExcelHelper.IsRangeContainsComment(SpreadsheetGrid, GridRangeInfo)
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved