ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1DisplayColumn.Style Property

Gets or sets the root Style for this column.

[Visual Basic]

Public Property Style As C1.Win.C1TrueDBGrid.Style

[C#]

public C1.Win.C1TrueDBGrid.Style Style {get;set;}

[Delphi]

public property Style: C1.Win.C1TrueDBGrid.Style read get_Style write set_Style;

Example

The following code uses the Style property to modify the appearance of the specified columns:

·      Visual Basic

       Dim C As C1.Win.C1TrueDBGrid.C1DisplayColumn

       For Each C In Me.C1TrueDBGrid1.Splits(0).DisplayColumns

           C.Style.HorizontalAlignment = C1.Win.C1TrueDBGrid.AlignHorzEnum.Center

           C.Style.BackColor = System.Drawing.Color.AliceBlue

       Next

·      C#

       foreach (C1.Win.C1TrueDBGrid.C1DisplayColumn C in this.c1TrueDBGrid1.Splits[0].DisplayColumns)

       {

           C.Style.HorizontalAlignment = C1.Win.C1TrueDBGrid.AlignHorzEnum.Center;

           C.Style.BackColor = System.Drawing.Color.AliceBlue;

       }

·      Delphi

       var

         C: C1.Win.C1TrueDBGrid.C1DisplayColumn;

       begin

         for C in Self.C1TrueDBGrid1.Splits[0].DisplayColumns do

         begin

           C.Style.HorizontalAlignment := C1.Win.C1TrueDBGrid.AlignHorzEnum.Center;

           C.Style.BackColor := System.Drawing.Color.AliceBlue;

         end;

       end;

See Also

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


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