C# Class SourceGrid.Grid

Inheritance: GridVirtual
Datei anzeigen Open project: zhuangyy/Motion Class Usage Examples

Private Properties

Property Type Description
DirectGetCell Cells.ICell
DirectSetCell void
InsertCell void
RemoveCell void

Public Methods

Method Description
GetCell ( int p_iRow, int p_iCol ) : Cells.ICellVirtual

Return the Cell at the specified Row and Col position.

Grid ( ) : System

Constructor

InvalidateCell ( Cells p_Cell ) : void

Force a redraw of the specified cell

InvalidateCell ( Position p_Position ) : void

Force a cell to redraw. If Redraw is set to false this function has no effects. If ColSpan or RowSpan is greater than 0 this function invalidate the complete range with InvalidateRange

PositionToCellRange ( Position pPosition ) : Range

This method converts a Position to the real range of the cell. This is usefull when RowSpan or ColumnSpan is greater than 1. For example suppose to have at grid[0,0] a cell with ColumnSpan equal to 2. If you call this method with the position 0,0 returns 0,0-0,1 and if you call this method with 0,1 return again 0,0-0,1.

Redim ( int p_Rows, int p_Cols ) : void

Set the number of columns and rows

SetCell ( Position p_Position, Cells p_Cell ) : void

Set the specified cell int he specified position. This method calls SetCell(int p_iRow, int p_iCol, Cells.ICellVirtual p_Cell)

SetCell ( int p_iRow, int p_iCol, Cells p_Cell ) : void

Set the specified cell int he specified position. Abstract method of the GridVirtual control

this ( int row, int col ) : Cells.ICell

Returns or set a cell at the specified row and col. If you get a ICell position occupied by a row/col span cell, and EnableRowColSpan is true, this method returns the cell with Row/Col span.

Protected Methods

Method Description
CreateColumnsObject ( ) : SourceGrid.ColumnsBase

Method used to create the columns object, in this class of type ColumnInfoCollection.

CreateRowsObject ( ) : SourceGrid.RowsBase

Method used to create the rows object, in this class of type RowInfoCollection.

OnSortingRangeRows ( SortRangeRowsEventArgs e ) : void

Fired when calling SortRangeRows method. If the range contains all the columns this method move directly the row object otherwise move each cell.

PaintCell ( DevAge graphics, CellContext cellContext, RectangleF drawRectangle ) : void

Private Methods

Method Description
DirectGetCell ( Position position ) : Cells.ICell
DirectSetCell ( Position position, Cells cell ) : void

Array of cells

InsertCell ( int row, int col, Cells p_cell ) : void

Insert the specified cell (for best performance set Redraw property to false)

RemoveCell ( int row, int col ) : void

Remove the specified cell

Method Details

CreateColumnsObject() protected method

Method used to create the columns object, in this class of type ColumnInfoCollection.
protected CreateColumnsObject ( ) : SourceGrid.ColumnsBase
return SourceGrid.ColumnsBase

CreateRowsObject() protected method

Method used to create the rows object, in this class of type RowInfoCollection.
protected CreateRowsObject ( ) : SourceGrid.RowsBase
return SourceGrid.RowsBase

GetCell() public method

Return the Cell at the specified Row and Col position.
public GetCell ( int p_iRow, int p_iCol ) : Cells.ICellVirtual
p_iRow int
p_iCol int
return Cells.ICellVirtual

Grid() public method

Constructor
public Grid ( ) : System
return System

InvalidateCell() public method

Force a redraw of the specified cell
public InvalidateCell ( Cells p_Cell ) : void
p_Cell Cells
return void

InvalidateCell() public method

Force a cell to redraw. If Redraw is set to false this function has no effects. If ColSpan or RowSpan is greater than 0 this function invalidate the complete range with InvalidateRange
public InvalidateCell ( Position p_Position ) : void
p_Position Position
return void

OnSortingRangeRows() protected method

Fired when calling SortRangeRows method. If the range contains all the columns this method move directly the row object otherwise move each cell.
protected OnSortingRangeRows ( SortRangeRowsEventArgs e ) : void
e SortRangeRowsEventArgs
return void

PaintCell() protected method

protected PaintCell ( DevAge graphics, CellContext cellContext, RectangleF drawRectangle ) : void
graphics DevAge
cellContext CellContext
drawRectangle System.Drawing.RectangleF
return void

PositionToCellRange() public method

This method converts a Position to the real range of the cell. This is usefull when RowSpan or ColumnSpan is greater than 1. For example suppose to have at grid[0,0] a cell with ColumnSpan equal to 2. If you call this method with the position 0,0 returns 0,0-0,1 and if you call this method with 0,1 return again 0,0-0,1.
public PositionToCellRange ( Position pPosition ) : Range
pPosition Position
return Range

Redim() public method

Set the number of columns and rows
public Redim ( int p_Rows, int p_Cols ) : void
p_Rows int
p_Cols int
return void

SetCell() public method

Set the specified cell int he specified position. This method calls SetCell(int p_iRow, int p_iCol, Cells.ICellVirtual p_Cell)
public SetCell ( Position p_Position, Cells p_Cell ) : void
p_Position Position
p_Cell Cells
return void

SetCell() public method

Set the specified cell int he specified position. Abstract method of the GridVirtual control
public SetCell ( int p_iRow, int p_iCol, Cells p_Cell ) : void
p_iRow int
p_iCol int
p_Cell Cells
return void

this() public method

Returns or set a cell at the specified row and col. If you get a ICell position occupied by a row/col span cell, and EnableRowColSpan is true, this method returns the cell with Row/Col span.
public this ( int row, int col ) : Cells.ICell
row int
col int
return Cells.ICell