ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1DisplayColumn.Width Property

Gets or sets the width of a column.

[Visual Basic]

Public Property Width As Integer

[C#]

public int Width {get;set;}

[Delphi]

public property Width: Int32 read get_Width write set_Width;

Remarks

Use the Width property in conjunction with Left and C1TrueDBGrid.RowHeight to determine the size and placement of controls displayed on top of a grid cell.

Note: The C1TrueDBGrid.DefColWidth property controls the default width of new columns created at run time.

Example

The following code sets the width of the first column in the first split to 50 pixels:

·      Visual Basic

       Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Width = 50

·      C#

       this.c1TrueDBGrid1.Splits[0].DisplayColumns[0].Width = 50;

·      Delphi

       Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Width := 50;

See Also

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


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