Class TableRow
Represents a table row.
Inherited Members
Namespace: FastReport.Table
Assembly: FastReport.dll
Syntax
public class TableRow : ComponentBase, IDisposable, IFRSerializable, IParent
Remarks
Use the Height property to set the height of a row. If AutoSize property is true, the row will calculate its height automatically.
You can also set the MinHeight and MaxHeight properties to restrict the row's height.
Constructors
TableRow()
Initializes a new instance of the TableRow class.
Declaration
public TableRow()
Properties
AutoSize
Gets or sets a value determines if the row should calculate its height automatically.
Declaration
public bool AutoSize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
CanBreak
Gets or sets a value that determines if the component can break its contents across pages.
Declaration
public bool CanBreak { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Height
Gets or sets a height of the row, in pixels.
Declaration
[TypeConverter("FastReport.TypeConverters.UnitsConverter, FastReport")]
public override float Height { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Overrides
Remarks
The row height cannot exceed the range defined by the MinHeight and MaxHeight properties.
note
To convert between pixels and report units, use the constants defined in the Units class.
Index
Gets the index of this row.
Declaration
[Browsable(false)]
public int Index { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Item[Int32]
Gets or sets the cell with specified index.
Declaration
[Browsable(false)]
public TableCell this[int col] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | col | Column index. |
Property Value
| Type | Description |
|---|---|
| TableCell | The TableCell object. |
KeepRows
Gets or sets the number of rows to keep on the same page.
Declaration
[Browsable(false)]
public int KeepRows { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
MaxHeight
Gets or sets the maximal height for this row, in pixels.
Declaration
[TypeConverter("FastReport.TypeConverters.UnitsConverter, FastReport")]
public float MaxHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
MinHeight
Gets or sets the minimal height for this row, in pixels.
Declaration
[TypeConverter("FastReport.TypeConverters.UnitsConverter, FastReport")]
public float MinHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
PageBreak
Gets or sets the page break flag for this row.
Declaration
[Browsable(false)]
public bool PageBreak { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Top
Gets or sets the top coordinate of the object in relation to its container.
Declaration
[Browsable(false)]
public override float Top { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Overrides
Remarks
This property value is measured in the screen pixels. Use Units class to convert a value to desired units.
To obtain absolute coordinate, use AbsTop property.
Methods
AddChild(Base)
Adds a child object to this object's childs.
Declaration
public void AddChild(Base child)
Parameters
| Type | Name | Description |
|---|---|---|
| Base | child | Object to add. |
Assign(Base)
Copies the contents of another, similar object.
Declaration
public override void Assign(Base source)
Parameters
| Type | Name | Description |
|---|---|---|
| Base | source | Source object to copy the contents from. |
Overrides
Remarks
Call Assign to copy the properties from another object of the same type. The standard form of a call to Assign is
destination.Assign(source);
which tells the destination object to copy the contents of the source object to itself. In this method, all child objects are ignored. If you want to copy child objects, use the AssignAll method.
See Also
CanContain(Base)
Gets a value indicating that this object can contain the specified child object.
Declaration
public bool CanContain(Base child)
Parameters
| Type | Name | Description |
|---|---|---|
| Base | child | Child object. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if this object can contain the specified child object; otherwise, false. |
CellData(Int32)
Declaration
public TableCellData CellData(int col)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | col |
Returns
| Type | Description |
|---|---|
| TableCellData |
Clear()
Clears the object's state.
Declaration
public override void Clear()
Overrides
Remarks
This method also disposes all object's children.
GetChildObjects(ObjectCollection)
Gets a list of child objects.
Declaration
public void GetChildObjects(ObjectCollection list)
Parameters
| Type | Name | Description |
|---|---|---|
| ObjectCollection | list | List to fill with values. |
GetChildOrder(Base)
Returns z-order of the specified child object.
Declaration
public int GetChildOrder(Base child)
Parameters
| Type | Name | Description |
|---|---|---|
| Base | child | Child object. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Z-order of the specified object. |
Remarks
This method must return the index of a specified child object in the internal child list.
RemoveChild(Base)
Removes a specified object from this object's childs.
Declaration
public void RemoveChild(Base child)
Parameters
| Type | Name | Description |
|---|---|---|
| Base | child |
Serialize(FRWriter)
Serializes the object.
Declaration
public override void Serialize(FRWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| FRWriter | writer | Writer object. |
Overrides
Remarks
Do not call this method directly. You should override it if you are developing a new component for FastReport.
This method is called when the object needs to save the state. It may happen when:
- saving the report to the file or stream;
- saving the report to the designer's undo buffer;
- assigning the object to another object using the Assign(Base) or AssignAll methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).
SetChildOrder(Base, Int32)
Sets the z-order of the specified object.
Declaration
public void SetChildOrder(Base child, int order)
Parameters
| Type | Name | Description |
|---|---|---|
| Base | child | Child object. |
| System.Int32 | order | New Z-order. |
Remarks
This method must place the specified child object at the specified position in the internal child list.
UpdateLayout(Single, Single)
Updates the children layout when the size of this object is changed by dx, dy values.
Declaration
public void UpdateLayout(float dx, float dy)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | dx | X delta. |
| System.Single | dy | Y delta. |
Remarks
This method must update positions/sizes of child objects whose Dock or Anchor properties are set to non-default values.