[]
        
(Showing Draft Content)

C1.Win.C1FlexGrid.C1FlexGrid

C1FlexGrid Class

The C1FlexGrid control is a powerful, full-featured grid.

C1FlexGrid provides advanced features such as outline trees, cell merging, masked editing, translated combo and image lists, owner-draw cells, and automatic data aggregation.

Namespace: C1.Win.C1FlexGrid
Assembly: C1.Win.C1FlexGrid.4.8.dll
Syntax
[ToolboxBitmap(typeof(C1FlexGrid), "C1FlexGrid.png")]
[Docking(DockingBehavior.Ask)]
[ComVisible(true)]
public class C1FlexGrid : C1FlexGridBase, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IFlexGridMultiRow, IFormattableView, IFlexDataGrid, ISupportInitialize
Remarks

C1FlexGrid can be used in bound mode, where it displays data from .NET data sources, or in unbound mode, where the grid itself manages the data.

You can use C1FlexGrid to read and write Excel files (.Xls), or read and write grid contents to and from Xml files.

Classes derived from C1FlexGrid should have a LicenseProvider attribute so Visual Studio will embed the appropriate licensing information into projects that use the derived control.

For example:

[LicenseProvider(typeof(LicenseProvider))]
public class MyGrid : C1FlexGrid
{
  // implementation
}

Constructors

Name Description
C1FlexGrid()

Creates a new instance of the C1FlexGrid control.

Properties

Name Description
AllowMerging

Gets or sets how cells should be merged.

AllowMergingFixed

Gets or sets how non-scrollable cells should be merged.

Font

Gets or sets the font of the text displayed by the control.

MergedRanges

Gets the CellRangeCollection that determines which grid cells are merged when the AllowMerging property is set to Custom.

Methods

Name Description
AutoSizeCols(Graphics, int, int, int, int, int, AutoSizeFlags)

Automatically size grid columns to fit the largest entry.

CalculateCellHeight(Graphics, int, int, bool, bool, bool, out int)

Calculates the height of the specified grid cell.

CheckNodeChildren(int, int, int)

Gets a value that indicates what types of child nodes a row has.

Clear()

Overridden to clear merged ranges.

DrawCell(PaintEventArgs, int, int, DrawColorMode)

Draws a grid cell.

DrawCellImage(Graphics, int, int, Rectangle, DrawColorMode)

Draws a grid cell.

DrawRow(PaintEventArgs, int, DrawColorMode)

Draws a grid row.

GetCellRectDisplay(int, int, bool, bool)

Gets a rectangle representing the coordinates of a cell, row, or column.

GetCellRectEditor(int, int)

Gets a rectangle representing the coordinates of a cell editor.

GetHeaderThemeState(int, int)

Gets the state for a Windows XP theme while the mouse moves over a cell.

GetMergedRange(int, int)

Returns the merged range of cells that includes a given cell.

GetMergedRange(int, int, bool)

Returns the merged range of cells that includes a given cell.

Invalidate(CellRange)

Invalidates a cell range, causing it to be repainted.

IsCellCursor(int, int)

Gets a value that determines if a cell contains the grid cursor.

IsCellHighlighted(int, int)

Gets a value that determines if a cell is part of the selection and should be highlighted.

IsCellHovered(int, int)

Gets a value that determines if a cell is part of the hovering and should be highlighted.

IsCellSelectedColumnHeader(int, int)

Gets a value that determines if a cell is a column header with selection in this column.

IsCellSelectedRowHeader(int, int)

Gets a value that determines if a cell is a row header with selection in this row.

MoveSelection(MoveCursorEnum, bool)

Moves or extends the current selection.

OnGridChanged(object, GridChangedEventArgs)

Raises the GridChanged event.

OnScroll(ScrollBars)

Called when the grid contents scroll.

ResetFont()

Resets the Font property to its default value.

SetCellCheckEdit(int, int, CheckEnum)

Applies a CheckEnum value to a cell or cell range.

SetDataEdit(int, int, object, bool)

Applies a value to a cell or cell range.

ShouldSerializeFont()

This method is for internal use only.

ShowColumnPicker()

Shows Column pickers window.

StartEditing(int, int, char, bool)

Starts editing a cell in response to a key press.

StartEditing(int, int, Point, bool)

Starts editing a cell in response to a mouse action.