aspnet-devexpress-dot-web-dot-aspxgridsearchpanelsettings-3cc864e6.md
Gets or sets a value that specifies whether the grid highlights the searched texts in the grid.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(true)]
public bool HighlightResults { get; set; }
<DefaultValue(True)>
Public Property HighlightResults As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true, if the grid highlights the searched text; otherwise, false.
|
The grid displays the search panel when the ASPxGridSearchPanelSettings.Visible property is set to true. It allows end users to type the required text in the panel editor to filter grid data.
Use the HighlightResults property to specify whether the grid should highlight the searched text.
Note
The grid does not highlight search results contained in templates.
The following example illustrates how to remove highlighting in the search results.
Web Forms (in markup):
<dx:ASPxGridView ID="Grid" runat="server" >
...
<SettingsSearchPanel Visible="true" HighlightResults="false" />
</dx:ASPxGridView>
Web Forms (in code):
ASPxGridView grid1 = new ASPxGridView();
grid1.ID = "grid1";
Page.Form.Controls.Add(grid1);
...
grid1.SettingsSearchPanel.Visible = true;
grid1.SettingsSearchPanel.HighlightResults = false;
MVC:
@Html.DevExpress().GridView(settings => {
settings.Name = "grid";
settings.SettingsSearchPanel.Visible = true;
settings.SettingsSearchPanel.HighlightResults = false;
...
}).Bind(Model).GetHtml()
GridView:
Web Forms: Search Panel
MVC: Search Panel
CardView :
VerticalGrid :
TreeList :
GridView :
Web Forms: ASPxGridView - Search Panel
CardView :
Web Forms: ASPxCardView - Search Panel
Vertical Grid :
Web Forms: ASPxVerticalGrid - Search Panel
Tree List :
Web Forms: ASPxTreeList - Search Panel
See Also
ASPxGridSearchPanelSettings Class