ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1DisplayColumn.ButtonHeader Property

Gets or sets a value indicating whether a column header will act like a button.

[Visual Basic]

Public Property ButtonHeader As Boolean

[C#]

public bool ButtonHeader {get;set;}

[Delphi]

public property ButtonHeader: Boolean read get_ButtonHeader write set_ButtonHeader;

Remarks

If True, the column header depresses like a standard Windows command button when clicked by the user.

If False (the default), the C1TrueDBGrid.AllowColSelect property determines how the column header responds to mouse input.

Typically, you set the ButtonHeader property to True when you want to perform a column-based action (such as sorting) when the user clicks a column header. Note that the C1TrueDBGrid.HeadClick event always is raised when the user clicks a column header, even if ButtonHeader is False.

Note: If ButtonHeader is True, the user must hold down the CTRL key in order to select columns with the mouse.

Example

The following code uses the ButtonHeader property to make the column header act like a standard Windows command button. Clicking the column header will raise the C1TrueDBGrid.HeadClick event:

·      Visual Basic

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

·      C#

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

·      Delphi

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

See Also

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


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