ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1DisplayColumn.ButtonText Property

Gets or sets a value indicating whether cells in this column look like buttons.

[Visual Basic]

Public Property ButtonText As Boolean

[C#]

public bool ButtonText {get;set;}

[Delphi]

public property ButtonText: Boolean read get_ButtonText write set_ButtonText;

Remarks

If True, the current cell is rendered as a command button with the cell text as the label. When clicked by the user, the C1TrueDBGrid.ButtonClick event is raised, just as it does for a graphical in-cell button.

If False (the default), the current cell is rendered as normal text and editing is permitted (unless otherwise restricted).

The ButtonText property takes precedence over the Button property. If both are True, then the graphical in-cell button is not displayed.

Note: If both the ButtonText and ButtonAlways properties are True, then all cells within the column are displayed as buttons, not just the current cell.

Example

The following code uses the ButtonText property to render the current cell as a non-editable command button within a Column object:

·      Visual Basic

       Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).ButtonText = True

·      C#

       this.c1TrueDBGrid1.Splits[0].DisplayColumns[0].ButtonText = true;

·      Delphi

       Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].ButtonText := True;

See Also

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


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