ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

Setting Multiple Height Values for Rows

To set multiple height values for rows, set the AllowRowSizing property to IndividualRows then assign height values to rows.

1.   Set the AllowRowSizing property to IndividualRows.

In the Designer

Locate the AllowRowSizing property in the Properties window and set it to IndividualRows.

In Code

Add the following code to the Form_Load event:

·      Visual Basic

Me.C1TrueDBGrid1.AllowRowSizing = C1.Win.C1TrueDBGrid.RowSizingEnum.IndividualRows

·      C#

this.c1TrueDBGrid1.AllowRowSizing = C1.Win.C1TrueDBGrid.RowSizing.IndividualRows;

·      Delphi

Self.C1TrueDBGrid1.AllowRowSizing := C1.Win.C1TrueDBGrid.RowSizing.IndividualRows;

2.   Assign different row heights to the first two rows by adding the following code to the Form_Load event:

·      Visual Basic

Me.C1TrueDBGrid1.Splits(0).Rows(0).Height = 25

Me.C1TrueDBGrid1.Splits(0).Rows(1).Height = 50

·      C#

this.c1TrueDBGrid1.Splits[0].Rows[0].Height = 25;

this.c1TrueDBGrid1.Splits[0].Rows[1].Height = 50;

·      Delphi

Self.C1TrueDBGrid.Splits[0].Rows[0].Height := 25;

Self.C1TrueDBGrid.Splits[0].Rows[1].Height := 50;

This topic illustrates the following:

The first row is set to 25 and the second row is set to 50.


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