ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1DisplayColumn.CellTop Property

Gets the vertical offset of the top of the cell for the current row.

[Visual Basic]

Public ReadOnly Property CellTop As Integer

[C#]

public int CellTop {get;}

[Delphi]

public property CellTop: Int32 read get_CellTop;

Remarks

A single record may span multiple lines in the grid. For columns on the first line, the CellTop property returns zero. For columns on the second line, the CellTop property returns the cell height (the grid's C1TrueDBGrid.RowHeight property). For columns on the third line, the CellTop property returns twice the cell height, and so on.

Example

The following code places a text box on top of the grid cell in the first column of the fourth displayed row:

·      Visual Basic

       Text1.Top = Me.C1TrueDBGrid1.Top + Me.C1TrueDBGrid1.RowTop(3) + Me.C1TrueDBGrid1.Columns(0).CellTop

·      C#

       text1.Top = this.c1TrueDBGrid1.Top + this.c1TrueDBGrid1.RowTop[3] + this.c1TrueDBGrid1.Columns[0].CellTop;

·      Delphi

       Text1.Top := Self.C1TrueDBGrid1.Top +Self.C1TrueDBGrid1.RowTop[3] + Self.C1TrueDBGrid1.Columns[0].CellTop;

See Also

C1DisplayColumn Class | C1DisplayColumn Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.