sandeep.gosavi
sandeep.gosavi

Reputation: 640

In Ext js how to highlight text in grid if it matches searching criteria

I have one grid and text box. I want to highlight values in grid which matches with value in text field.

For example, in firefox, if you press cntrl + F4, you will see one text box and you write a value which you want to find. Firefox hightlights string mathing with this value.

Can we do like this in extjs? How?

Upvotes: 1

Views: 3168

Answers (2)

BrookeS
BrookeS

Reputation: 21

Sandeep, the trick to the highlighting is actually in the CSS. You can navigate to ../examples/ux/css/LiveSearchGridPanel.css to find the following code:

.x-livesearch-match {font-weight: bold; background-color: yellow; }

You can add the CSS href to your index.html, or add this code to your css Hope this is what you were able to figure out.

Upvotes: 2

Evan Trimboli
Evan Trimboli

Reputation: 30082

There is an example of exactly that here:

http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/grid/live-search-grid.html

Upvotes: 4

Related Questions