ColumnView.FindPanelItems Property
Gets settings that allow you to display custom items within the Find Panel.
Namespace: DevExpress.XtraGrid.Views.Base
Assembly: DevExpress.XtraGrid.v24.1.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
Declaration
[Browsable(false)]
[DXCategory("Behavior")]
public FindControlItems FindPanelItems { get; }
Property Value
Type | Description |
---|---|
FindControlItems | Contains settings that allow you to display custom items within the Find Panel. |
Remarks
You can use the following methods to add buttons, check buttons, or other controls within the Find Panel:
The following code sample adds a check button that switches the ColumnView.OptionsFind.Behavior property at runtime:
void button_AddCheck_Click(object sender, System.EventArgs e) {
var checkItem = gridView1.FindPanelItems.AddCheckButton(
"btnBehavior",
"Filter",
false,
(s, args) => {
CheckButton checkButton = s as CheckButton;
gridView1.OptionsFind.Behavior = checkButton.Checked ? FindPanelBehavior.Search : FindPanelBehavior.Filter;
checkButton.Text = checkButton.Checked ? "Search" : "Filter";
}
);
checkItem.ImageOptions.ImageUri.Uri = "Filter;Size16x16;Svg";
}
The AutoHeight property specifies whether to adjust the height of added items to match the Find Panel height or stretch the panel to display controls in their original size.
RemoveItem and RemoveItems methods allow you to remove custom items from the Find Panel:
void button_Remove_Click(object sender, System.EventArgs e) {
gridView1.FindPanelItems.RemoveItem("btnBehavior");
}
Usage Notes
- The Find Panel sets the GridViewOptionsFind.FindPanelLocation property to
Panel
when you add custom items. - Controls added through the
FindPanelItems
property do not save and restore their layout. - The GridControl automatically hides the Find Panel if it occupies half the grid space. This can occur when you add a large control to the panel with the AutoHeight option disabled.
- RemoveItem and RemoveItems methods do not remove items with blank (
""
) names. - Do not add items with the same name, even though
Add..
methods allow this action.