Gets or sets a value indicating whether a drop-down button will be displayed in this column.
[Visual Basic]
Public Property FilterButton As Boolean
[C#]
public bool FilterButton {get;set;}
[Delphi]
public property FilterButton: Boolean read get_FilterButton write set_FilterButton;
Remarks
If True, a button will be displayed in the upper right corner of the current filter cell at run time.
If False (the default), no button will be displayed.
Typically, the column button is enabled when wanting to drop-down a control (such as the built-in combo box, a bound list box, or even another C1TrueDBGrid control) for editing or data entry. When the button in the current cell is clicked, the C1TrueDBGrid.FilterButtonClick event will be raised and then code can be written to drop-down the desired control from the cell.
Example
The following code uses the FilterButton property to turn on the drop-down button in the Filter Bar:
' The drop-down control is bound to the Customers table.
Me.C1TrueDBGrid1.Columns("CustomerID").DropDown = Me.C1TrueDBDropdown1
' Turn on the drop-down button in the Filter Bar.
Me.C1TrueDBGrid1.Splits(0).DisplayColumns("CustomerID").FilterButton = True
· C#
// The drop-down control is bound to the Customers table.
this.c1TrueDBGrid1.Columns["CustomerID"].DropDown = this.c1TrueDBDropdown1;
// Turn on the drop-down button in the Filter Bar.
this.c1TrueDBGrid1.Splits[0].DisplayColumns["CustomerID"].FilterButton = true;
· Delphi
// The drop-down control is bound to the Customers table.
Self.C1TrueDBGrid1.Columns['CustomerID'].DropDown := Self.C1TrueDBDropdown1;
// Turn on the drop-down button in the Filter Bar.
Self.C1TrueDBGrid1.Splits[0].DisplayColumns['CustomerID'].FilterButton := True;
See Also
C1DisplayColumn Class | C1DisplayColumn Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |