searchPanel

Specifies options of the search panel.

Type: Object

A search panel is a grid element that allows the user to search grid records by a search string. Searching performs in those grid columns that have the allowFiltering option set to true.

The search panel is located in the upper-right corner of the dxDataGrid widget. To make it visible, set the visible property of the searchPanel configuration object to true.

See Also
  • To discover how to configure the search panel, see the Search Panel topic.
  • For more information about searching, refer to the Searching topic.

Also, you can search grid records by a search string from code. Call the searchByText(text) method to do this.

View Demo

Show Example:
jQuery

In this example, the search panel is made visible using the visible option of the searchPanel object. Additionally, its width is changed using the width option of the same object.


                                    

                                    

highlightSearchText

Specifies whether or not search strings in the located grid records should be highlighted.

Type: Boolean
Default Value: true

Show Example:
jQuery

In this example, you can change the value of the searchPanel | highlightSearchText option using the check box under the grid. Type something in the search panel and see the changes.


                                    

                                    

placeholder

Specifies text displayed by the search panel when no search string was typed.

Type: String
Default Value: "Search..."

Show Example:
jQuery

In this example, the text displayed by an empty search panel is changed using the searchPanel | placeholder option.


                                    

                                    

text

Sets a search string for the search panel.

Type: String
Default Value: ""

Show Example:
jQuery

In this example, the search string is specified initially using the searchPanel | text option.


                                    

                                    

visible

Specifies whether the search panel is visible or not.

Type: Boolean
Default Value: false

Show Example:
jQuery

In this example, you can change the visibility of the search panel at runtime using the check box located below the grid.


                                    

                                    

width

Specifies the width of the search panel in pixels.

Type: Number
Default Value: 160

Show Example:
jQuery

In this example, the width of the search panel is changed using the searchPanel | width option.