Syncfusion.Grid.Windows
Members 


Syncfusion.Windows.Forms.Grid Namespace : GridControlBaseImp Class

GridControlBaseImp Class

Implements a grid control that displays a grid model.
Object Model
GridControlBaseImp ClassIMouseController InterfaceGridCellRendererCollection ClassGridCellRendererBase ClassGridCurrentCell ClassDoubleBufferSurface ClassIGridDropDownContainer InterfaceIGridDrawSelectionFrame InterfaceGridRangeInfo ClassIGridControlBaseEventsTarget InterfaceScrollBarWrapper ClassMetroColorTable ClassGridModel ClassMouseControllerDispatcher ClassMetroColorTable ClassMetroColorTable ClassMetroColorTable ClassMetroColorTable ClassIGridOleDragDropEventsTarget InterfaceIGridPaintSelectCells InterfaceIGridWindowlessSite InterfaceGridPrintInfo ClassGridRangeInfo ClassScrollTipWindow ClassGridModelSelections ClassGridControlVisualStyle ClassGridRangeInfoList ClassGridRangeInfo ClassGridRangeInfo ClassGridViewLayout ClassScrollBarWrapper Class
Syntax
'Declaration
 
<ToolboxItemAttribute(False)>
<DefaultPropertyAttribute("Text")>
<DefaultEventAttribute("Click")>
<DesignerAttribute("System.Windows.Forms.Design.ControlDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>
<DesignerSerializerAttribute("System.Windows.Forms.Design.ControlCodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>
<ToolboxItemFilterAttribute("System.Windows.Forms")>
<DesignerCategoryAttribute("Component")>
Public Class GridControlBaseImp 
   Inherits GridControlBase
   Implements Syncfusion.Drawing.INonClientPaintingSupport, IGridModelSource, IGridWindowlessObject, IGridWindowlessSite, Syncfusion.Windows.Forms.ICancelModeProvider, Syncfusion.Windows.Forms.ICreateNewWindow, Syncfusion.Windows.Forms.IFindParentForm, Syncfusion.Windows.Forms.IQueryFocusInside, Syncfusion.Windows.Forms.IScrollBarWrapperContainer, Syncfusion.Windows.Forms.ISplitterPaneSupport, Syncfusion.Windows.Forms.ISupportIntelliMouse, Syncfusion.Windows.Forms.ISupportUpdating, Syncfusion.Windows.Forms.IThemedControl, Syncfusion.Windows.Forms.IVisualStyle, Syncfusion.WinForms.Theme.IThemeProvider 
'Usage
 
Dim instance As GridControlBaseImp
[ToolboxItem(false)]
[DefaultProperty("Text")]
[DefaultEvent("Click")]
[Designer("System.Windows.Forms.Design.ControlDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[DesignerSerializer("System.Windows.Forms.Design.ControlCodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[ToolboxItemFilter("System.Windows.Forms")]
[DesignerCategory("Component")]
public class GridControlBaseImp : GridControlBase, Syncfusion.Drawing.INonClientPaintingSupport, IGridModelSource, IGridWindowlessObject, IGridWindowlessSite, Syncfusion.Windows.Forms.ICancelModeProvider, Syncfusion.Windows.Forms.ICreateNewWindow, Syncfusion.Windows.Forms.IFindParentForm, Syncfusion.Windows.Forms.IQueryFocusInside, Syncfusion.Windows.Forms.IScrollBarWrapperContainer, Syncfusion.Windows.Forms.ISplitterPaneSupport, Syncfusion.Windows.Forms.ISupportIntelliMouse, Syncfusion.Windows.Forms.ISupportUpdating, Syncfusion.Windows.Forms.IThemedControl, Syncfusion.Windows.Forms.IVisualStyle, Syncfusion.WinForms.Theme.IThemeProvider  
Remarks
GridControlBase implements a view on a GridModel. Several views can be opened for the same model. Changes in GridModel are reflected immediately among all views.

The GridModel provides storage for all data and settings associated with the grid. The GridControlBase implements user interaction and display of the data.

GridControlBase is a user control that is derived from Syncfusion.Windows.Forms.ScrollControl. It lets the user scroll through grid data with mouse or keyboard. The grid displays a large number of cells where each cell can have its own unique formatting and cell type.

GridControlBase also offers a wide range of events that let you customize the default behavior of the grid at run-time.

In version 1.x, the GC class did derive directly from GridControlBase. Version 2.x derives GridControl from GridControlBaseImp. If you do have classes that derive directly from GridControlBase, your code will break. Please read the following explanation.

If you derived directly from GridControlBase in your code, it is recommended that you change your code such that you derive from GridControlBaseImp instead.

If you derived from the GridControl class, no action is required on your side.

Here is why:

In Version 1.x, the GridControlBase class did by default initialize all MouseControllers and CellTypes.

We changed this now such that the GridControlBase class will only initialize the very basic cell types and mouse controllers. This step will help us later make the grid more modular and provide techniques to trim down the size of the grid assembly if you only need a subset of the features or also if we want to make parts of the grid work without interop code. The idea was to have a grid base class that only has minimal dependencies on other classes. If you have the grid source code and look at the grid\src tree, you will notice a "Base" folder and an "Extensions" folder. "Base" contains all essential files for a bare grid. "Extensions" contains all the files to make it a full-featured grid.

In order to keep compatibility with existing code, the GridControlBaseImp class has been added. GridControlBaseImp is derived from GridControlBase and its sole purpose is to initialize all mouse controllers and cell types and establish other dependencies on grid features.

If you derived directly from GridControlBase in your code base, it is recommended that you change your code such that you derive from GridControlBaseImp instead. Then your code should work without further change. Otherwise you need to manually initialize MouseControllers and cell types.

The GridControl class itself has been changed such that it derives from GridControlBaseImp. Therefore if you were using the GridControl class no further change is necessary on your side.

Here is a list of differences between GridControlBaseImp and GridControlBase:

  • GridControlBaseImp sets up the GridCellModelFactory as default cell type factory. GridControlBase on the other hand only sets up GridBaseCellModelFactory. GridCellModelFactory is able to instantiate the whole range of cell types that are part of Essential Grid. GridBaseCellModelFactory on the other hand only has dependencies on Header, Static, TextBox, ComboBox, and PushButton.

    So, if your code derives from GridControlBase directly and some celltypes do not appear to get instantiated, you should add cell types manually to the CellModels collection or derive from GridControlBaseImp.

  • GridControlBaseImp overrides the InitializeMouseControllers method. In this override it checks Model.Options.ControllerOptions and instantiates all mouse controllers that have been specified in this flag. GridControlBase on the other hand does not perform any action in InitializeMouseControllers.

Other features that are implemented in GridControlBaseImp and not GridControlBase are:

  • The AccessibilityEnabled property. GridControlBase itself has no Accessibility support.
  • Multiple cell selection.
  • OLE drag-and-drop
  • Cell tips

Again, if you derived from GridControl, no action is required. If you derived from GridControlBase, please change your code to derive from GridControlBaseImp instead.

The change is mainly a preparation to make it easier for us in future. We try hard not to break existing code. Providing a GridControlBaseImp class seemed like a good, easy solution and will help us in the future make the grid more modular.

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Windows.Forms.Control
            Syncfusion.Windows.Forms.Core.BaseControl
               Syncfusion.Windows.Forms.ScrollControl
                  Syncfusion.Windows.Forms.Grid.GridControlBase
                     Syncfusion.Windows.Forms.Grid.GridControlBaseImp
                        Syncfusion.Windows.Forms.Grid.GridControl
                        Syncfusion.Windows.Forms.Grid.GridDataBoundGrid
                        Syncfusion.Windows.Forms.PivotAnalysis.PivotGridControlBase

AssemblyVersion

Syncfusion.Grid.Windows: 17.3460.0.26

See Also