View Full Version : Implement search in Extjs

28 May 2013, 12:28 AM
Hi,How to implement "Search"option in ExtJs ?thanks in advance

28 May 2013, 1:32 AM
the question is very vague. what would you like to search for?

28 May 2013, 2:45 AM
I have a tree which has many nodes , search button should search that nodes and also predective search facility must also be available.

28 May 2013, 3:29 AM
you can have a textfield above the tree and then add a listener on the change event of the textfield. this way, whenever, the value changes, you can do a search on your tree nodes.

for tree store, there are functions to get root node and then get the child elements. you can use these methods to implement your search functionality.

28 May 2013, 12:57 PM
findChild and findChildBy may come in handy in your search function, though what you may actually end up using is cascadeBy (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.data.NodeInterface-method-cascadeBy).