ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.SelectedStyle Property

Gets or sets the Style object that controls the appearance of selected rows and columns.

[Visual Basic]

Public Property SelectedStyle As C1.Win.C1TrueDBGrid.Style

[C#]

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

[Delphi]

public property SelectedStyle: C1.Win.C1TrueDBGrid.Style read get_SelectedStyle write set_SelectedStyle;

Example

The following code adds a green gradient to the selected row or column in the grid:

·      Visual Basic

       Me.C1TrueDBGrid1.SelectedStyle.BackColor = Color.Green

       Me.C1TrueDBGrid1.SelectedStyle.GradientMode = GradientModeEnum.Horizontal

·      C#

       this.c1TrueDBGrid1.SelectedStyle.BackColor = Color.Green;

       this.c1TrueDBGrid1.SelectedStyle.GradientMode = GradientModeEnum.Horizontal;

·      Delphi

       Self.C1TrueDBGrid1.SelectedStyle.BackColor := Color.Green;

       Self.C1TrueDBGrid1.SelectedStyle.GradientMode := GradientModeEnum.Horizontal;

See Also

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


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